Why does it turn?
Centre speed0 m/sTurn rate0°/s
Motor speed → movement
Centre speed = (left speed + right speed) ÷ 2.
Turn rate = (right speed − left speed) ÷ wheel spacing. Positive turns left.
Connections for a real car
Controller → motor driver → motors. Connect controller and driver grounds. Power motors from a suitable supply, never directly from GPIO.
Forward means both wheels push the robot forward. Because motors face opposite sides, their electrical polarity may need to differ.
On four-wheel cars, pair the two motors on each side only if the driver can handle their combined current.
Ideal no-slip model: motor percentage scales wheel RPM linearly. Real robots have dead zones, acceleration, battery sag and wheel slip. STOP here means immediate zero speed, not a model of electrical braking.