|
Re: Gyro Issues
Make sure the gyro is plugged into either analog channel 1 or analog channel 2. Those are the only ones with the accumulators to convert the rate output to a heading.
If you just look at the analog channel output (not the gyro object angle) you should see the voltage centered near 2.5V. Quickly rotating the robot in one direction will make the voltage go down while it's rotating. Rotating in the other direction should make the voltage go up while it's moving.
When the robot isn't rotating the voltage will go back to 2.5V again since it is measuring rate of rotation.
Once that's working, creating a gyro object should show headings. Be sure that the gyro sensitivity parameter in the class matches the gyro sensitivity specification otherwise it will incorrectly calculate headings.
If you aren't seeing that, make sure that everything is wired correctly.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
|