Dawn Robotics Forum Support and community forums for Dawn Robotics Ltd 2014-08-16T17:10:37+01:00 http://forum.dawnrobotics.co.uk/feed.php?f=5&t=1261 2014-08-16T17:10:37+01:00 2014-08-16T17:10:37+01:00 http://forum.dawnrobotics.co.uk/viewtopic.php?t=1261&p=1378#p1378 <![CDATA[Re: ADXL345 3 axis accelerometer]]>
I didn't think to run it twice!!
It's now reading OK.

Oh and my strange UU reading is also at position 30, b the same as yours - I typed the original question from memory.

Thanks again

Mike

Statistics: Posted by mike1234 — Sat Aug 16, 2014 5:10 pm


]]>
2014-08-14T19:13:54+01:00 2014-08-14T19:13:54+01:00 http://forum.dawnrobotics.co.uk/viewtopic.php?t=1261&p=1376#p1376 <![CDATA[Re: ADXL345 3 axis accelerometer]]>
First off, apologies for the delayed reply on this. Been a bit snowed under lately and I thought it might take a while to get set up on this.

The way I've approached this is by following this tutorial, which maybe is the one you've tried?

I too get the slightly odd UU although mine is at position (30, b). Anyway, when I ran the example.py script I got 0.000G on all axes as you did, but then when I ran it again it all works and I got what looked like sensible values for all axes (i.e. when it was flat on the table z was close to 1G and x, y were both close to zero).

Looking at the code of the ADXL345 class it looks like it sends a message to the accelerometer to enable measurements. Now in example.py the ADXL345 class is created and then a call is immediately made to getAxes. My guess is that actually a small delay is needed when the accelerometer is first used to give the command time to be accepted, hence why the script works the second time it's run.

Of course, this may not be the problem you're having... :? Can you try following the linked tutorial and then running the script repeatedly to see if you get any improvement?

Cheers

Alan

Statistics: Posted by Alan — Thu Aug 14, 2014 7:13 pm


]]>
2014-08-06T16:58:48+01:00 2014-08-06T16:58:48+01:00 http://forum.dawnrobotics.co.uk/viewtopic.php?t=1261&p=1374#p1374 <![CDATA[ADXL345 3 axis accelerometer]]> I'm having great difficulty communicating with the above sensor. I've trawled through all the obvious sites for guidance. I'm using rpi model B and want to use python.
The rpi recognizes the sensor is connected at '53', unexpectedly there is also a UU at position '37' !!
I believe i2c tools have been installed successfully.
When running a test script I get 0.000G which is incorrect.
I also get a problem where the quick2wire file is not found.

If anyone has a script that works I'd be very grateful.

Statistics: Posted by mike1234 — Wed Aug 06, 2014 4:58 pm


]]>