Hello there,
I am currently tring to mimic Dali commands. My poc looks like that.
I loop throw on an array and set a the dout accordingly. My issue is that the code is really slow.
Attached a picture of the output. Is there a way to make it run faster?
command2 = [1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]
led_pin.value(1)
time.sleep_us(3000)
for a in command2:
led_pin.value(a)
time.sleep_us(420)
also I did tried basic dout changes without anything. that wasn’t fast either.
led_pin.value(1)
led_pin.value(0)
led_pin.value(1)
Also tried sdout based on this github issue but I found a lot of unwanted traffic, I can’t adjust a the speed using that protocol, and the output didn’t really made much sense to me.
This was my code:
write_data(b"1001010101010101100101010101010101")
time.sleep_us(3000)
write_data(b"1001010101010101101001100101010101")
time.sleep(2)
and this was my output in a broader view first and last spike is unwanted traffic:
and a closer view of the first message:
Thanks in advance,