ubuntu-phone team mailing list archive
-
ubuntu-phone team
-
Mailing list archive
-
Message #00466
Re: access accelerometer
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Aswin,
Yes, take a look at the QtSensors 5.0 AccelerometerSensor object. You
can instantiate this and get raw accelerometer data. As a QML example,
I have tried this as a simple test while I was implementing the Qt
plugin for it.
Accelerometer {
id: asensor
active: true
onReadingChanged: {
console.log("X: " + reading.x)
console.log("Y: " + reading.y)
console.log("Z: " + reading.z)
}
}
Let me know if you have any other questions.
Jim
On 02/26/2013 07:27 AM, Aswin Thomas wrote:
>
> Hi all, At present is there anyway I can get raw accelerometer
> data? Is there a sensor package/API I can look at?
>
> Thank you Aswin
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJRLL0YAAoJENCYE0OpVkFTyF8H/AwJjAc2Bxb/xEAM0dHB9nJT
N6YzPX3i5MjenIPF0FjJ/1v3Athnclqrn7tp/0FAL8NeGC4KQ5UxvQWYjrWX9FaW
ylI3WhQX3TQDogCZf+yL1IEEFIMAjK4ROkEYs4bfKB4SsmCOyUUbAdi4MFNLr+VZ
e9yk+UYr3oIQsD1LGZdrVN+apnRzBnEg7Jw2VU/huAmqj8qdWLcVtVoUfEnWxQaH
LZKIc4puyc0bvRV/2z2UCkUTpzTeZItMHEr0EAA12LbIwU3aQ1TY7uzO+ElcoEU0
cDxGKoqJQ42ar63AO9ouG8WnJtTeuBjmS6QwspPCwjCWulLAdRSgcnw+7XwsEEo=
=++9B
-----END PGP SIGNATURE-----
References