View Single Post
  #5   Spotlight this post!  
Unread 16-02-2006, 13:08
mallot1243's Avatar
mallot1243 mallot1243 is offline
Registered User
FRC #1243
 
Join Date: Apr 2004
Rookie Year: 2004
Location: Swartz Creek, MI
Posts: 27
mallot1243 is an unknown quantity at this point
Re: Problems with Programming

Quote:
Originally Posted by DHarris
Just some simple programming from one of the tutorials. This is the one that makes the robot continously move in one direction without stopping.


And this is the code that makes the "Code Error" light turn red on the O/I.
OK. If you want to robot to stop immediately after moving forward the best choice is to "reverse brake" or set the values to the opposite for a moment if you drivetrain can handle it. Also make sure you debug everything, sometimes somewhere in your code you set a very broad if statement or else so that a pwm is 127 and this affects the rest of your code, especially if it occurs under your desired section. Your best bet is to create a flow chart, that always helps with me when I'm in this situation.\

And about that code light, I hate it and I don't know whats up so I compile the code a lot and add it to the controller just to check for the code error and if it works so I know where I screwed up on the code. Good luck.
__________________


WINNER! 2004 West Michigan Regional
2004 Rookie All-Star Pittsburgh Regional
2004 Highest Rookie Seed Pittsburgh Regional
2004 Rookie Inspiration Award West Michigan Regional
2004 Highest Rookie Seed West Michigan Regional (3rd)
2004 #2 Seed Kettering Kick-Off
2004 Kettering Kick-Off "Big Dog" (Finalist)
2005 Qtr-Finalist Pittsburgh Regional
2005 Kettering Kick-Off Qtr-Finalist
2006 Midwest Qtr-Finalist
2006 Midwest 12th Seed

Last edited by mallot1243 : 16-02-2006 at 13:10.