|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Whenever I assign variables (including competition_mode, autonomous_mode, pwm01, and pwm02), the variable values turn into 256x whatever I assigned.
For instance, if I give pwm01 the value 127, the value returned after I use a printf command is 32512. Here is my code in my Stop function (located in the User_Autonomous_Code function):void Stop (int counter1) // Drive forward until counter reaches zero { while( counter1 > 0 ) { counter1--; pwm01 = 127; printf("pwm01: %d\n", pwm01); pwm02 = 127; printf("pwm02: %d\n", pwm02); printf("should be stopped \n"); printf("counter1: %d\n", counter1); } } Anyone have a similar problem or know how to fix it? |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| FRC default code | hedgehogger | Programming | 2 | 21-01-2004 18:41 |
| Problem with FRC Default code | AsimC | Programming | 2 | 11-01-2004 19:22 |
| ADC problems with C library and new code | Larry Barello | Programming | 1 | 09-01-2004 22:31 |