 |
| Site Admin |
 |
Joined: Thu Mar 01, 2001 11:00 am Posts: 784 Location: Temecula, CA
|
|
Depending how accurate you need it the compass may be the easiest solution. With the gyro you will get accumulated error over time. Maybe the best solution would be both at once. The gyro for immediate changes and the compass to correct for gyro error.
Using a heading hold gyro(the expensive ones which compensate for drift) is doable. Actually interfacing to them would be tricky. You could provide a servo input signal to it from an AtomPro no problem(use hservo). Writing the code to read the modified signal the gyro would output and then convert it back into something useful for the micro would be difficult(though not impossible). You could use one of TimerWs input capture pins to read the servo pulse generated by the gyro. Subtract the period of the pulse sent to the gyro from hservo to get the gyro adjustment(eg turn left, turn alot left, turn right, turn alot right etc...).
|
|