13 lines
195 B
Python
13 lines
195 B
Python
import serial
|
|
|
|
pishock = serial.Serial('/dev/tty.usbserial-120')
|
|
|
|
pishock.baudrate = 115200
|
|
pishock.timeout = 15
|
|
|
|
print(pishock)
|
|
|
|
pishock.write(b'{"cmd": "info"}\n')
|
|
|
|
print(pishock.readlines())
|