Thread: Live C++ help
View Single Post
  #3   Spotlight this post!  
Unread 02-06-2012, 08:53 PM
agartner01 agartner01 is offline
Captain + Control Sys & Design
FRC #4174
Team Role: Engineer
 
Join Date: Feb 2012
Rookie Year: 2012
Location: Hector MN
Posts: 109
agartner01 is an unknown quantity at this point
Re: Live C++ help

Hey there, I saw this thread and was wondering if you could help me get the accelerometer (and possibly the gyro) setup. The following is copied and pasted from the official FIRST forums.


I have my accelerometer plugged into the digital sidecar via the I2C bus. I try to set it up but just get compile errors. Can't understand why. Can someone help me out? Code below. Bold indicates complie errors.

Code:
ADXL345_I2C *accelerometer;
...
accelerometer = new ADXL345_I2C (1,kRange_2G);
...
std::cout<<accelerometer->GetAcceleration(Axes kAxis_X);

Last edited by agartner01 : 02-06-2012 at 08:56 PM.
Reply With Quote