ADXL345 accel - only 2 sigfigs
jbirdman
Posts: 9
I'm new to the propeller and trying to get an adxl345 accelerometer working, using this object: http://obex.parallax.com/objects/562/
I can get it working and read data from it (using the demo included), but it'll only read in 2 sigfigs (ie instead of 32_something ft/s/s, i only read 32). I've dug though the code in the object and the demo and done some searching but I'm officially stumped so I'd appreciate some help.
Thanks,
~Bird
I can get it working and read data from it (using the demo included), but it'll only read in 2 sigfigs (ie instead of 32_something ft/s/s, i only read 32). I've dug though the code in the object and the demo and done some searching but I'm officially stumped so I'd appreciate some help.
Thanks,
~Bird
Comments
My suspicion is that in order to get more digits I need to read more than two bytes, but I don't know enough about i2c to figure out how to do that, I've tried playing around with the Read2byte function but haven't gotten it working.
Could You post more of Your code? just use the handy Archive feature in the Prop tool.
I am not sure what a "sigfigs" is...
Thanks for the offer of help, I can still post the code if you're interested.
I'm telling you, this stuff is so easy, it's hard...
Feel free to post up Your code, it serves as an example for others trying to hard..
Personally, I get a kick out of seeing code I have written previously, I have come very far in a year, (for me anyway).
and I am amazed that I could actually make the thing work in spite of my copy and paste code "writing" skills.