Go to Post The Questions is, do we attempt to build a Mr.Fusion, or do we go for the Plutonium from the Libyans? - dag0620 [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 02-02-2008, 20:12
steve d steve d is offline
Registered User
FRC #1277
 
Join Date: Jan 2007
Location: Groton, ma
Posts: 38
steve d is an unknown quantity at this point
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
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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


All times are GMT -5. The time now is 09:40.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi