View Single Post
  #9   Spotlight this post!  
Unread 03-03-2011, 07:13 PM
Trevin Trevin is offline
Registered User
FRC #3191
 
Join Date: Mar 2011
Location: US
Posts: 1
Trevin is an unknown quantity at this point
Re: ADXL345 I2C Accelerometer NOT WORKING

I have been trying to hook up my accelerometer and have had similar problems. I am writing in Java and have tried using the ADXL345_I2C class to interface with the accelerometer, but to no end. Every time I try to get the acceleration all I get back is 0, no matter how much I shake it.

I have also tried using I2C directly and still got nothing.

I would like to try SPI, but I don't know how I would get the data back in the code, the DigitalInput class only returns boolean values, not doubles.

If someone could tell me how to use SPI in Java or what I'm doing wrong with the I2C I would really appreciate it!!! Thanks.
Reply With Quote