English • العربية • Български • Česky • Dansk • Deutsch • Esperanto • Eesti • Español • فارسی • Suomi • Français • עברית • Magyar • Italiano • 한국어 • Nederlands • Norsk (bokmål) • Polski • Português • Română • Русский • Svenska • Slovenčina • Українська • 中文(中国大陆) • 中文(台灣) • Euskara • Català
Here's a quick and simple C program that reads a packet from the accelerometer once per second, and rotates the screen to a new orientation if the orientation has changed.
I don't mean this to conflict with Paul's excellent work on Gestures; my reason for writing it is so that it can be used as an always-on daemon in the OM distributions. (Full gesture interpretation is more CPU heavy and requires reading data more often than once per second, so perhaps that will be done on-demand instead of always-on.)
The code is:
There's an ARM binary here (chmod a+x rotate && ./rotate):
There's also a complete rewrite at http://blog.1407.org/tag/rotate
And you're welcome to make patches against the GIT repo here:
- Patch for using libxrandr instead of system+xrandr -- Rui Miguel Silva Seabra <rms_ghaaaNoSpamPlease_at_1407_org>
Would anyone else be interested in being the maintainer of this package? It would involve packaging it up in bitbake/OE and trying to persuade the various OM distros to include it by default. (Perhaps with an on/off control panel entry in distros that make that easy to do?)
Comments appreciated. Thanks!
- Chris. -- Chris Ball <cjb_at_laptop_dot_org>
Packages and Binaries
- Arm releases built by Rui
accel-rotate at projects.openmoko.org
 how to display data from accelerometers on Desktop in gnuplot (there is a few of czech text, but there is also youtube video).
- project page
- Source codes are in subversion, every developer is welcome
- disabling of rotation while shaking (some heuristics)
- disabling of rotation while is screen saver running
- is there any dbus event "disable rotation" ?
- Om2008.x package:
opkg install http://projects.openmoko.org/frs/download.php/392/accel-rotate_0.2_armv4t.ipk update-rc.d accel-rotate defaults
- Qt Extended 4.4.1 package:
echo "/opt/Trolltech/Qtopia/lib/">> /etc/ld.so.conf.d/local.conf # there are some important libraries ldconfig opkg install http://projects.openmoko.org/frs/download.php/413/accel-rotate_0.2_qte441_armv4t.ipk /etc/init.d/accel-rotate start update-rc.d accel-rotate defaults # start at boot time
Rotates the screen according to the position of the Neo FreeRunner.