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 3: Line 3:
==Hardware==
==Hardware==
-
The accelerometer in the phone is a [http://www.st.com/web/catalog/sense_power/FM89/SC444/PF152913 LIS302DL].
+
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
-
** Interrupt on crossing arbitrarily set threshold on any axis, either absolute or speed of change (via programmable highpass filer). Note: the kernel driver doesn't support any of the advanced trigger configs, just simple threshold on x,y axis.
 
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 31: Line 30:
===Bugs===
===Bugs===
-
Sometimes the LIS302 in N900 gets massive offset on one or more axes, due to unknown reason (possibly I2C errors). Symptoms: Dialer autorotation fails or gets weird. Even rebooting seems not to help to fix this, but removing battery for some seconds resets the chip. Powering down the device should help too (Note: device never really powers down as long as power is on USB, i.e. charging)
+
Sometimes the LIS302 in N900 gets massive offset on one or more axes, due to unknown reason (possibly I2C errors). Symptoms: Dialer autorotation fails or gets weird. Even rebooting seems not to help to fix this, but removing battery for some seconds resets the chip.
==Software==
==Software==
Line 47: Line 46:
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/
-
 
-
See also how to handle [[Using_Fremantle_widgets#Portrait_Mode|portrait mode switching]].
 
=== sysfs ===
=== sysfs ===
Line 56: Line 53:
  /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 mG= 1 G
+
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"
Line 226: Line 223:
};
};
</source>
</source>
-
 
-
==References==
 
-
<references />
 
[[Category:N900 Hardware]]
[[Category:N900 Hardware]]
[[Category:Development]]
[[Category:Development]]

Learn more about Contributing to the wiki.


Please note that all contributions to maemo.org wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see maemo.org wiki:Copyrights for details). Do not submit copyrighted work without permission!


Cancel | Editing help (opens in new window)