View Single Post
  #7   Spotlight this post!  
Unread 27-01-2004, 14:04
seanwitte seanwitte is offline
Registered User
None #0116
Team Role: Engineer
 
Join Date: Nov 2002
Location: Herndon, VA
Posts: 378
seanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant future
Send a message via AIM to seanwitte
Re: Autonomous help please

Quote:
Originally Posted by hobbes
There is really no code to show. In the user routines fast, there is a statement to put your autonomous code here. I place pwm## = 200;. I load the code into the robot. I put the robot into autonomous mode (using the switch built up as instructed, and it does work) and nothing happens (i.e. the motors programmed to drive forward do nothing). Im just at a loss, as to why the autonomous code does not execute.
Are you sure the robot is in autonomous mode and isn't disabled? The RC LED should be yellow and blinking. I know you said it blinks, just making sure its yellow. Which PWMs are you using?

In User_Autonomous_Code() they left out a call to Generate_Pwms(). That function sets the outputs for pwm13 - 16. If you're using one of those outputs then the value you set isn't getting sent to the motor. Insert the line "Generate_Pwms(pwm13,pwm14,pwm15,pwm16);" right before
"Putdata(&txdata);" in User_Autonomous_Code().

If that doesn't work, try putting a printf() in User_Autonomous_Code() to make sure that function is being executed.