From Openmoko

Jump to: navigation, search

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):



  • author: Kurt Van Dijck <>
  • [1] ipkg for 2008.12
  • [2] for sources

I found that rotating the desktop area in landscape (using xrandr) makes the XGlamo eat the CPU on my GTA-02 system.

Rotating the display head (xrandr --output default ...) works without major CPU load.

By using no libxrandr, but invoking xrandr commands, it only depends on the accelerometer.

omnewrotate at

accel-rotate at

No-screenshot.png Rotate

Rotates the screen according to the position of the Neo FreeRunner.

Package: accel-rotate (external download)
Tested on: FSO, ASU, QtExtended

  • Om2008.x package:
opkg install
  • Qt Extended 4.4.1 package:
opkg install
  • Source codes are in subversion, developers are welcome
  • TODO:
    • better heuristics - any ideas how to do this well? please use discussion on this wiki.
    • disabling on screensaver
  • [3] how to display data from accelerometers on Desktop with gnuplot (there is a few of czech text, but there is also youtube video).


No-screenshot.png Simple-Rotate

Rotates the screen according to the position of the Neo FreeRunner.

Package: simple-rotate (external download)
Tested on: ASU, Debian

Author: Miguel Angel Vilchez Lopez

  • Debian package:
dpkg -i simple-rotate.deb
  • ASU binary:(Sorry, but still i have no ipkg package)
chmod +x simple-rotate
./simple-rotate &

See also

Personal tools