Drive a robot
Control two motors with buttons and watch the wheels in the simulator. Intermediate · 15 min
Start this tutorial in TinkerPie Studio
Connect the motors
On the real board: left wheel motor to MOTOR 2, right wheel motor to MOTOR 1 (bottom side). The simulator shows both as wheels.
Forward on A
Add
on button A pressedwithtank drive left 60 % right 60 %.Stop on B
Add
on button B pressedwithbrake motor M1 + M2.Turn
Add
on π logo touchedwithtank drive left -50 % right 50 %,pause (ms) 600,stop motor M1 + M2.Run
Press Run and use A, B and the π logo. The motor gauges under the board show speed and direction.