bobjacobsen / python-openlcb

MIT License
2 stars 1 forks source link

Add serial interface #12

Closed bobjacobsen closed 8 months ago

bobjacobsen commented 8 months ago

This adds access to a serial link via openlcb/serialport.py. This is plug-compatible with openlcb/tcpsocket.py, so you just replace

s = TcpSocket()
s.connect(host, port)

with

from openlcb.serialport import SerialPort
s = SerialPort()
s.connect("/dev/cu.usbmodemCC570001B1")

(with the appropriate device name)