|
Re: Gyro Sensor Questions
This was our first year using a gyro. We used the one from the KoP. We used it to help keep the robot on the "straight and narrow", and it worked okay... at least in conjunction with two other advances (well, they were advances for us).
One: the joystick code was retuned using a lookup table to approximate exponential readings (ie, very little turning when the stick is near centre, but full readings when near the edges.)
Two: we used the IFI USB Chicklet attached to a Logitech game controller. The game controller has two analog joysticks, one for each thumb. We use one thumb for forward/reverse and one for left/right. By seperating the two we no longer have to worry about accidentaly making the robot turn when we are trying to drive straight.
In any case, as far as learning to use the gyro, just hook it up to an analog input and use printf statements to show you the readings so you can get a feel for it. Yes, you can turn the KoP gyro slowly enough that it won't show any readings... but is that EVER a slow turn. Then stick it to your robot and experiment with some of the code samples as posted above.
Adding stuff like the gyro not only makes your robot easier to drive, but helps you to explain to people the differences between tele-operated mode, where the robot makes decisions based on your input, and plain old radio controlled toys where the toy follows your decision mindlessly.
Jason
|