|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
we need help with PWM problem in autonomous
We're getting strange pwm trouble in Autonomous Mode. If I put pwm13 = pwm14 = 127 in User_Autonomous_Code(), the speed controller's LED are green and motors turn. If I use pwm13 = pwm14 = 0 or if I use pwm13 = pwm14 = 255, both make LEDs turn off and motors spin opposite. If I do this in the default routine, it works right: 127, LEDs are orange; 255,green and 0 red.
Can anyone tell my why the PWMs act different in Default and Autonomous? here's the code in User_Autonomous_Code() : ... /* Add your own autonomous code here. */ Remote_Controls(); Generate_Pwms(pwm13,pwm14,pwm15,pwm16); Putdata(&txdata); /* DO NOT DELETE, or you will get no PWM outputs! */ ... } void Remote_Controls() { // if Remote # 2 is pressed, stop if (rc_dig_in02==0) { pwm13 = pwm14 = 127; pwm15 = pwm16 = 127; } // if Remote # 3 is pressed, backup if (rc_dig_in03==0) { pwm13 = pwm14 = 0; pwm15 = pwm16 = 0; } // if Remote # 4 is pressed, fwd if (rc_dig_in04==0) { pwm13 = pwm14 = 255; pwm15 = pwm16 = 255; } } |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problem with PWM outputs on RC | Adam Richards | Control System | 1 | 20-02-2007 06:37 |
| I have a BIG problem with my controller, need help. | razer | Control System | 7 | 12-01-2007 06:21 |
| HELP needed, problem with streamling, need uploading space or diffrent solution... | Nimmy | General Forum | 5 | 15-02-2006 11:18 |
| need help with autonomous | caderader | Programming | 3 | 14-02-2005 18:25 |
| PWM problem in autonomous | outofcontrol | Programming | 5 | 27-02-2004 11:58 |