All motors spinning wrong direction but wiring is correct

Hello All,

I have just built my first Monsterborg, Im only using the webUI to control the device.
When I click forward the monster goes backwards and when i click reverse the monster goes forward, I thought it might be a wiring issue, I checked and everything is 100% the same as the instructions.
Also another point to support wiring is correct, when i click turn left or right they operate in the correct directions.
If I click turn left or right while the monster is moving forward or backwards it will stop and rotate in the direction I had clicked, this is because the motors then start going in the correct direction when the turn is clicked.
I need help the monster is not usable like this.

piborg's picture

No problem, the motor directions can be changed in the script :)

In the monsterWeb.py script look for these lines:

            # Set the outputs
            driveLeft *= maxPower
            driveRight *= maxPower
            TB.SetMotor1(driveRight)
            TB.SetMotor2(driveLeft)

Add a - to values for the two SetMotor commands so they look like this:

            # Set the outputs
            driveLeft *= maxPower
            driveRight *= maxPower
            TB.SetMotor1(-driveRight)
            TB.SetMotor2(-driveLeft)

This should fix the forwards and backwards behaviour.

Subscribe to Comments for "All motors spinning wrong direction but wiring is correct"