|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#2
|
||||
|
||||
|
Re: 2008 Gyro Code
FireJet,
The first thing you need to do is move the Process_Gyro_Data() into the Autonomous_Spin, Disabled_Spin and Teleop_Spin functions. This will allow a Gyro data to be processed all the time, not just during that 26.2 milliseconds loop. Remember, Get_Gyro_Angle returns a long value. You need to typecast it to an int for your printf statement. Something like this. Code:
tmpangle = int Get_Gyro_Angle();
printf("Gyro Angle %d\n\r", tmpangle);
|
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Gyro code problem | AMIRAM | Programming | 10 | 23-01-2006 04:26 |
| problems using gyro/adc code with camera default code | tanstaafl | Programming | 7 | 22-01-2006 23:09 |
| gyro code | odin892 | Programming | 2 | 08-04-2003 14:50 |
| Gyro Chip Code | archiver | 2001 | 4 | 24-06-2002 00:57 |