def write_frame(self): """ Send a DMX frame """ # DMX needs a 88us low to begin a frame, # 77uS us used because of time it takes to init pin dmx_uart = Pin(tx_pins[self.port], Pin.OUT_PP) dmx_uart.value(0) udelay(74) dmx_uart.value(1) # Now turn into a UART port and send DMX data dmx_uart = UART(self.port) dmx_uart.init(250000, bits=8, parity=None, stop=2) #send bytes dmx_uart.write(self.dmx_message) #Delete as its going to change anyway del (dmx_uart)