View Single Post
  #14   Spotlight this post!  
Unread 22-01-2008, 16:00
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 590
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: Issues with our code

Quote:
Originally Posted by Ryan O View Post
Hi,

We are also having problems with our gyro. I plug it in to port one, as init, start it, ect. It gives zero for awhile, then starts increasing and doesn't stop, even if the gyro isn't moving. Any help would be great.
Make sure it's plugged into an analog port rather than a digital port.

The gyro returns the rate of rotation as an analog value - where no rotation is will return a value around 512 (center).

You can easily test if the gyro is working by running easyC and opening the Online Window. Load the Online code into the robot and look on the screen at analog port 1. Now you should be able to twist the gyro (or robot if it's attached) and see the analog values jump from a centered value around 512 to either smaller or larger numbers for left and right twists. Remember, the value will only change while the robot is moving since it is measuring rate of rotation, not the heading.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute