-
Notifications
You must be signed in to change notification settings - Fork 4
Rx Capturing five channels of NULL data. #3
Description
Hi Mike,
Thanks again for the DMX code here, its been working really well for me, but i've been implementing a bit of a workaround that i'd love to fix properly.
It seems that with my usb to DMX unit (ENTEC OPEN DMX USB) i'm capturing 5 channels worth of null (0) bytes at the start of each transfer.
e.g. my first 8 channels look like this:
bytearray(b'\x00\x00\x00\x00\x00\xfe\x19\x00')
when they should instead look like
bytearray(b'\xfe\x19\x00\x00\x00\x00\x00\x00')
I'm sure i'm sending the correct channel data from my computer (e.g. in the above example chn1 is 254, chn2=25).
I've just been ignorning the first 5 channels as a workaround. This generally works, but sometimes, the correct data without the 5 NULL channels comes through and messes things up.
I also tried with a ENTEC DMX USB PRO and that was worse: there was a variable amount of NULL channels coming through.
Could the wait after the start bit being too short?
(in dmx.py)
"3. The PIO waits for a zero (start bit) and starts to sample the data ~6us later - the start bit should be 4us long"
Could it be the race condition you mentioned?
Any dirrection I should consider investigating more?
As a safer workaround i'm considering outputting a constant 255 on the first channel, and then when i process it, i'll just search for the first 255 and take the remaining channels. I'd loose the very last channel of the dmx universe, but i'm not using those anyway.
Thanks!