Re: Stupidest Programming Mistakes
Originally our drive motors were hooked up such that 255 on both sides made the bot drive backward, because the person wiring them didn't know what the polarity should be. At this point I was using EasyC's Tank command to drive the bot, so I told the electronics people not reverse the wiring, because it was easier for me to just check "Invert direction" in EasyC.
My (yet untested) autonomous code, however, used PWM commands, which I had already set to numbers greater than 127 to drive the bot forward (logically).
For the longest time, I couldn't figure out why it drove backward in autonomous....
|