added minimal example for remote control via laptop
This commit is contained in:
parent
1b2a8368e1
commit
80ee257a7d
10
micropython_firmware/remote_control.py
Normal file
10
micropython_firmware/remote_control.py
Normal file
|
@ -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
|
Loading…
Reference in New Issue
Block a user