Thread: Live C++ help
View Single Post
  #11   Spotlight this post!  
Unread 02-07-2012, 07:16 PM
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Live C++ help

Two things:
1. It doesn't solve your problem but your picture showed that the +5 wire is black and the GND wire is red. The robot inspector will probably frown on this since this is opposite to the convention.
2. Could you change your line to the following instead? If you are not moving, the X axis will read zero. But Z will give you approx. 1 (since earth has 1G). Or you should move the accelerometer board around to see if the reading changes.
Code:
std::cout<<accelerometer->GetAcceleration(Axes kAxis_Z);
__________________
Reply With Quote