When I created the SquareBot and used the transmitter to move the bot forward you pushed forward on both joysticks (in 23 mode) but when I take the same configuration and using easyC, try to make both motors go forward (ie. both 255), one motor goes forward and the other goes backwards. This make sense because they are facing opposite directions in the squarebot configuration. Is there any way that I can reverse the direction of the motors? For example, 255 to one motor would make it spin clockwise and 255 to another would make it spin counterclockwise.
**Although we do not support easyC questions, yes you can reverse the direction of a motor in your User code. This is how the default code makes one motor spin CW and another motor spin CCW for the same joystick movement. See the line in our default code that has the comment “ // reverse direction of left side (CCW) ” using MPLAB not easyC.
You can not send the same value “255” to 2 different motors and have them spin in different directions. The value of 255 is converted into a PWM pulse of a certain width. This pulse width is sent from the Vex Micro Controller to the Vex Motor, where it is decoded by the Vex Motor into a direction and speed. Therefore; the pulse created from a value of “255” will always be decoded into the same direction and speed by ever Vex Motor.**