View Single Post
  #27   Spotlight this post!  
Unread 05-02-2010, 02:28
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: 2010 Accelerometer I2C Object/Class

Quote:
Originally Posted by urg8rb8 View Post
We tested out the code for the I2C Accelerometer and we seem to be having some issues. We are doing the following:

Code:
ADXL345DigitalAccelerometer accelerometer;

accelerometer = ADXL345DigitalAccelerometer(4);

accelerometer.initialize();
accelerometer.getZAxis();
For some reason, the code is getting blocked in the initialize() call and never returns out of it. We have the accelerometer plugged into the correct header on the sidecar and we do not have the "blob of solder" on the jumper so we are using the default address that is coded in the class object. What could be the problem?

Any help would be appreciated!
Is your sidecar powered? Is the clock line shorted? Will unplugging the sensor allow the initialize method to return?
Reply With Quote