Maybe it's an issue with unicode. I would try this -Thought : I have never used UART - Do you have to flush after the write ?
I would also try without invert, and also post the circuit diagram for your output - If the wiring is wrong it isn't ever going to work.
Code:
from machine import Pin, UARTimport timeuart = UART(0, baudrate=31250, bits=8, parity=None, stop=1, tx=Pin(16), rx=Pin(17), invert=UART.INV_TX)while True: for channel in range(0, 16): for programNumber in range(0, 3): msg = bytearray() msg.append(0xC0 + channel) msg.append(programNumber) print("Send", msg) uart.write(msg) time.sleep(0.5)I would also try without invert, and also post the circuit diagram for your output - If the wiring is wrong it isn't ever going to work.
Statistics: Posted by hippy — Sun Sep 14, 2025 11:31 pm