Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Working with the ADXL345 (http://www.chiefdelphi.com/forums/showthread.php?t=124425)

tinybob20 10-01-2014 16:18

Working with the ADXL345
 
Hi,

Our team has been trying to implement a ADXL345 accelerometer to use for a PID-controlled drive system. We tried to talk to to it over the basic I2C class, but it returned weird values when we moved it (30,-30,40,-40, etc). We tried to use the ADXL345_I2C class, but we couldn't even get it to return a value. Is there a special way this sensor needs to be created or set up? (if we can get it to work just using the basic I2C, we would be pretty happy.)

Any help appreciated.

cgmv123 10-01-2014 16:49

We've never had much success with the WPILib ADXL345_I2C class. I don't know if this one was tested thoroughly, but it should work better.

https://github.com/team1306/Badgerbo...erometer2.java

You'll need this class as well: https://github.com/team1306/Badgerbo...lib/Point.java


All times are GMT -5. The time now is 22:34.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi