Accelerometer help
damion
Posts: 39
getting values of 6500 for xy axis data with memsic accelerometer. The pdf that i have says that I should be getting value in the area of 2500, any help?
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
· xRaw = xRaw * 2
You need to change that to:
· xRaw = xRaw */ $0CC
The */ operator lets us multiply by fractional values, and $0CC represents 0.8 for the BS2p
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
X Axis:· 5024·· 0.016 g··· 0°
Y Axis:· 5006·· 0.000 g··· 0°
The first number in each line is the true raw pulse width in us, the second the g-force and the third the degrees of tilt from a horizontal plane.· The program contains a conditional compilation that lets the program run on any Stamp without having to·change·the program.· A perfect 50% duty cycle would display 5000 and 5000, so you can see the duty cycle is very, very close to 50%.
The program has been modified so that if the current reading is the same as the previous reading, then it skips the display and goes back for another reading.· It has been further modified to display the reading every 50 program cycles, regardless of whether the readings are the same or not.
If you would like the program just let me know and I will post it.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
Do you have a Stamp Tester yet?
http://hometown.aol.com/newzed/index.html
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax