Shop OBEX P1 Docs P2 Docs Learn Events
Tilt problem — Parallax Forums

Tilt problem

tfiegenbtfiegenb Posts: 12
edited 2014-03-04 09:10 in General Discussion
The tilt function http://learn.parallax.com/propeller-c-simple-devices/tilt-and-acceleration-mx2125isn’t working. When running the program as described at the above link I get “ tilt x -90, tilt y = -90,” It doesn’t make any difference if I tilt theboard, I get a constant and unchanging readout.
I am wondering if the module is defective or if it is the correct module. It looks like the one from the Parallax web site http://www.parallax.com/product/28017 however, the part numbers do not match.
The curriculum calls for a MX2125. The device I have which looks the same isST-00008.

Comments

  • tfiegenbtfiegenb Posts: 12
    edited 2013-12-31 07:45
    Upon further research it appears the ST-00008 is wrong part though it looks the same. There is a Memsic 2-axis- accelerometer and a 4 Directional Tilt sensor. I have the 4 directional Tilt Sensor.
  • PublisonPublison Posts: 12,366
    edited 2013-12-31 07:50
    tfiegenb wrote: »
    Upon further research it appears the ST-00008 is wrong part though it looks the same. There is a Memsic 2-axis- accelerometer and a 4 Directional Tilt sensor. I have the 4 directional Tilt Sensor.

    I don't think there is any C code for the tilt sensor, but the product page:

    http://www.parallax.com/product/28036

    h
    as SPIN and BS2 code that should be easy to translate.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-12-31 08:54
    There's a big difference in the output from the sensors. The tilt sensor is just on or off for a particular direction of tilt. It doesn't give you any sort of angle information. I think it's kind of like having four buttons. Which "button" or direction is "on" depends on which way it's tilted.
  • Steph LindsaySteph Lindsay Posts: 767
    edited 2014-03-04 09:10
    tfiegenb, there is a C project with the 4-Directional Tilt Sensor. It uses the simpletools.h get_states function.

    http://learn.parallax.com/project/propeller-tilt-tones
Sign In or Register to comment.