View Single Post
  #3   Spotlight this post!  
Unread 15-02-2013, 18:22
progal's Avatar
progal progal is offline
Programmer
AKA: Shelby
FRC #0384 (Sparky)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Glen Allen
Posts: 15
progal is an unknown quantity at this point
Re: Accelerometer Code Making Robot Stop Moving

Quote:
Originally Posted by kenfox View Post
Does the following code work better?

Code:
adxl(1, 5, 6, 7, 8)
It did work.. kinda. It gave us the values but after it showed us these values it didn't update after that:
X: 0
Y: 2
Z: 4

This is how we're getting the values:
Code:
dsLCD->PrintfLine(DriverStationLCD::kUser_Line4, "Accelerometer X: %d", adxl.kAxis_X);
dsLCD->PrintfLine(DriverStationLCD::kUser_Line5, "Accelerometer Y: %d", adxl.kAxis_Y);
dsLCD->PrintfLine(DriverStationLCD::kUser_Line6, "Accelerometer Z: %d", adxl.kAxis_Z);
Is this how we should be finding the values?
__________________

C++ Programmer
Reply With Quote