- Add the Drive Pad (in Input โ Vehicle Control). It is a big 2ร2 widget.
- It sends F front, B back, L left, R right and S stop.
- Hold an arrow to drive โ let go and it sends Stop.
- Put the board code below on your robot.
Board code
Put this on your TinkerPy board with TinkerPy Projects:
from tinkerpy_mega import * from motor import * from bluetooth import * def setup(): bluetooth_begin() # switches Bluetooth on when the board starts set_function(o3, MOTOR_RIGHT_FORWARD) set_function(o4, MOTOR_RIGHT_BACKWARD) set_function(o5, MOTOR_LEFT_FORWARD) set_function(o6, MOTOR_LEFT_BACKWARD) def loop(): bt = bluetooth_read_char() if bt == 'F': robot_control("F", 80, "F", 80) elif bt == 'B': robot_control("B", 80, "B", 80) elif bt == 'L': robot_control("B", 70, "F", 70) elif bt == 'R': robot_control("F", 70, "B", 70) elif bt == 'S': robot_control("S", 0, "S", 0)