From 80ee257a7d7082c0be8308de84ce22a0e63ca51f Mon Sep 17 00:00:00 2001 From: spirkelmann Date: Sat, 13 Apr 2019 14:30:30 +0200 Subject: [PATCH] added minimal example for remote control via laptop --- micropython_firmware/remote_control.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 micropython_firmware/remote_control.py diff --git a/micropython_firmware/remote_control.py b/micropython_firmware/remote_control.py new file mode 100644 index 0000000..dbfaa0c --- /dev/null +++ b/micropython_firmware/remote_control.py @@ -0,0 +1,10 @@ +import socket + +rc_socket = socket.socket() +rc_socket.connect(('192.168.4.1', 1234)) # connect to robot + +rc_socket.send('l\n') # left +rc_socket.send('r\n') # right +rc_socket.send('f\n') # forward +rc_socket.send('b\n') # backward +rc_socket.send('q\n') # quit