Editing N900 accelerometer
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
- | The accelerometer detects orientation and movement of the | + | The accelerometer detects orientation and movement of the phone. |
==Hardware== | ==Hardware== | ||
- | The accelerometer in the phone is a [http://www.st.com/ | + | The accelerometer in the phone is a [http://www.st.com//stonline/products/literature/ds/12726/lis302dl.pdf LIS302DL]. |
It is connected through [[N900 Hardware Bus I2C|the I2C bus]]. | It is connected through [[N900 Hardware Bus I2C|the I2C bus]]. | ||
Line 13: | Line 13: | ||
** Click and double click recognition | ** Click and double click recognition | ||
** Zero G detection | ** Zero G detection | ||
- | |||
The click and double click functionality are not implemented in the current software. | The click and double click functionality are not implemented in the current software. | ||
Line 25: | Line 24: | ||
===Fundamental limitations=== | ===Fundamental limitations=== | ||
- | For example - with a 9 mG error - there is an | + | For example - with a 9 mG error - there is an accelleration error of 9 centimeters per meter per second. |
This means that after 10 seconds, the velocity may be anywhere within a 1.8 m/s (around 4 MPH) band, and the position inaccurate by 4.5 m. After 100 s, the position inaccuracy is up to 450 m (this assumes the orientation of the phone is known exactly). | This means that after 10 seconds, the velocity may be anywhere within a 1.8 m/s (around 4 MPH) band, and the position inaccurate by 4.5 m. After 100 s, the position inaccuracy is up to 450 m (this assumes the orientation of the phone is known exactly). | ||
- | |||
- | |||
- | |||
- | |||
==Software== | ==Software== | ||
Line 47: | Line 42: | ||
Thomas Thurman ([http://twitter.com/marnanel marnanel]) has put together a simple demo of an application using accelerometers using the D-Bus interface. You can find sources and .deb up at http://people.collabora.co.uk/~tthurman/sandcastle/ | Thomas Thurman ([http://twitter.com/marnanel marnanel]) has put together a simple demo of an application using accelerometers using the D-Bus interface. You can find sources and .deb up at http://people.collabora.co.uk/~tthurman/sandcastle/ | ||
- | |||
- | |||
=== sysfs === | === sysfs === | ||
Line 56: | Line 49: | ||
/sys/class/i2c-adapter/i2c-3/3-001d/coord | /sys/class/i2c-adapter/i2c-3/3-001d/coord | ||
- | When reading that file you get 3 values X, Y and Z (provided on one line, separated by white space). Values are in mG (milli G). 1000 | + | When reading that file you get 3 values X, Y and Z (provided on one line, separated by white space). Values are in mG (milli G). 1000 = 1 G |
{| class="wikitable" | {| class="wikitable" | ||
- | |||
|- | |- | ||
! Position | ! Position | ||
Line 132: | Line 124: | ||
</source> | </source> | ||
x,y,z are the raw accelerometer measurements values, and the first three variables give text information about the device orientation. In particular, the first one informs about the landscape/portrait state. | x,y,z are the raw accelerometer measurements values, and the first three variables give text information about the device orientation. In particular, the first one informs about the landscape/portrait state. | ||
- | |||
- | |||
=== Smoothed C interface === | === Smoothed C interface === | ||
Line 175: | Line 165: | ||
} | } | ||
</source> | </source> | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
[[Category:N900 Hardware]] | [[Category:N900 Hardware]] | ||
[[Category:Development]] | [[Category:Development]] |
Learn more about Contributing to the wiki.