Go to Post Maybe someday soon the quote will be, "As American as baseball and FIRST robotics!" - KathieK [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 14-01-2012, 10:35
flyvin flyvin is offline
Registered User
FRC #0095
 
Join Date: Dec 2009
Location: Lebanon NH
Posts: 8
flyvin is an unknown quantity at this point
Accelerometer Showing All Zeros

I'm trying to get the accelerometer to work using Java, but I'm having some trouble. I'm wiring it with I2C and using the "ADXL345_I2C" class. When I try to print out the x, y, and z values using "getAcceleration()", it just prints out zeros for everything.

I've gone over the wiring a bunch of times and it all looks correct to me. We also checked to voltage on the pins and it seems to change when we shake the accelerometer, so I don't think it's broken. Our java and crio are both up to date (as of today). I've never used I2C before, so there might be something obvious I'm missing. Any help would be appreciated.
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:19.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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