Thymio Fernbedienung
Der folgende Kode erlaubt es, den Roboter mit einer Standard RC5 Fernbedienung zu steuern:
onevent rc5
if rc5.command == 2 then
motor.left.target = 300
motor.right.target = 300
elseif rc5.command == 8 then
motor.left.target = -300
motor.right.target = -300
elseif rc5.command == 4 then
motor.left.target = -300
motor.right.target = 300
elseif rc5.command == 6 then
motor.left.target = 300
motor.right.target = -300
else
motor.left.target = 0
motor.right.target = 0
end