2020-08-20, 09:56 AM
Ok,
I'm looking at Marco Bergmans code and wondering if it can help, as he manages sending (but not generic $STALK though), using only regular GPIO.
https://github.com/marcobergman/
I'm looking at Marco Bergmans code and wondering if it can help, as he manages sending (but not generic $STALK though), using only regular GPIO.
https://github.com/marcobergman/
Code:
def write_seatalk (xx, yy):
# thanks to http://www.thomasknauf.de/seatalk.htm
with serial.Serial() as ser:
ser.baudrate = 4800
ser.port = '/dev/serial0'
ser.stopbits=serial.STOPBITS_ONE
ser.bytesize=serial.EIGHTBITS
ser.open()
ser.parity = serial.PARITY_MARK
ser.write(b'\x86')
ser.parity = serial.PARITY_SPACE
ser.write(b'\x11' + chr(int(xx, 16)) + chr(int(yy, 16)))
ser.close()
Jeanneau Sun Odyssey 42.2 - All Openplottered and hooked up on online.