~/python $ python ac.py Using the meego graphics system loaded the Generic plugin loaded the grue plugin Loaded the MeeGo sensor plugin Setting data rate 0 Hz (interval 0 ms) for "meego.accelerometer" Setting data rate 0 Hz (interval 0 ms) for "meego.magnetometer"
import sys from PySide.QtCore import * from QtMobility.Sensors import * app = QCoreApplication(sys.argv) sensor = QAccelerometer() sensor.start() reading = sensor.reading() print reading.x(), reading.y(), reading.z()
~/python $ python acc.py loaded the Generic plugin loaded the grue plugin Loaded the MeeGo sensor plugin Setting data rate 0 Hz (interval 0 ms) for "meego.accelerometer" 0.0 0.0 0.0 ~/python $