UIFlow Guide
from m5stack import *
from m5ui import *
from uiflow import *
import module
import time
setScreenColor(0x222222)
dmx = module.get(module.DMX512)
dmx.dmx_init(13, 35, 12, 1)
while True:
dmx.write_dmx_data(1, 0)
wait(1)
dmx.write_dmx_data(2, 0)
wait(1)
dmx.write_dmx_data(3, 0)
wait(1)
dmx.write_dmx_data(1, 255)
wait(1)
dmx.write_dmx_data(2, 255)
wait(1)
dmx.write_dmx_data(3, 255)
wait(1)
wait_ms(2)
from m5stack import *
from m5ui import *
from uiflow import *
import module
setScreenColor(0x222222)
dmx = module.get(module.DMX512)
dmx.dmx_init(13, 35, 12, 2)
while True:
print((str('ch1:') + str((dmx.read_dmx_data(1)))))
print((str('ch2:') + str((dmx.read_dmx_data(2)))))
print((str('ch3:') + str((dmx.read_dmx_data(3)))))
dmx.clear_dmx_buffer()
wait_ms(2)
import module
dmx = module.get(module.DMX512)
dmx.dmx_init(tx, rx, en, mode)
dmx.read_dmx_data(ch)
dmx.write_dmx_data(ch, 100)
dmx.clear_dmx_buffer()
dmx.delete_port()