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.