|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||||
|
|||||
|
Keeping a certain heading using a gyro
Hi all,
OK, I've been looking at Kevin's gyro code, and have been trying to work out an algorithm to maintain a certain heading using the gyro supplied in the kit. My thoughts are leaning towards something like this: Code:
Reset_Gyro_Angle();
if(Get_Gyro_Angle > 10){//1 degree
turn left
}
else if(Get_Gyro_Angle < -10){//-1 degree
turn right
}
else
stop
And would this code (without optimizations) allow self adjustment to a certain heading (despite oscillations)? Thanks, |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Gyroscope Code | Kevin Watson | Programming | 65 | 01-03-2008 23:46 |
| Labview used to debug the Gyro | joshR515 | National Instruments LabVIEW and Data Acquisition | 1 | 09-02-2006 20:56 |
| Updated: Example Gyro Interface Code | Kevin Watson | Programming | 2 | 28-03-2005 04:36 |
| Example gyro code released. | Kevin Watson | Programming | 60 | 17-03-2005 18:32 |
| Gyro Troubles | SteveO | Programming | 13 | 30-01-2005 16:46 |