Closed wallarug closed 3 months ago
I still haven't really got this working properly yet.
I managed to read the DMX stream, but I am at a complete loss of how to determine which channels correspond to what values.
A lot of the things I have been reading are using the pio state machine (which I haven't used before).
Any assistance with this would be great.
Hi @wallarug I have an experimental library that reads DMX, and I will put it onto GitHub for you, but it will take a few weeks before I can make the time for doing that.
The assembly code that does this listens for the sequence of the BREAK, MARK AFTER BREAK, and NULL START Code, and then follows some assembly code Voodoo to ignore a specified number of slots, then capturing a sequence of 16 or 32 slots, after which it stalls. Fitting this in 32 operations is not straightforward at all.
The Python interface works in three steps: 1. Initialize the Python object and the PIO state machine. 2. Direct the PIO to listen to the DMX stream. 3. Poll the Python object for any available data. Repeat steps 2 and 3 to feed your animation. Your Python will also need to Implement a timeout. There is an error condition where the state machine can stall without returning data, if this happens repeat step 2.
Given that you need something, I'll put something online as soon as I can. It'll be a few weeks, but I'll respond to this thread when I do.
Hi @wallarug I have an experimental library that reads DMX, and I will put it onto GitHub for you, but it will take a few weeks before I can make the time for doing that.
The assembly code that does this listens for the sequence of the BREAK, MARK AFTER BREAK, and NULL START Code, and then follows some assembly code Voodoo to ignore a specified number of slots, then capturing a sequence of 16 or 32 slots, after which it stalls. Fitting this in 32 operations is not straightforward at all.
The Python interface works in three steps: 1. Initialize the Python object and the PIO state machine. 2. Direct the PIO to listen to the DMX stream. 3. Poll the Python object for any available data. Repeat steps 2 and 3 to feed your animation. Your Python will also need to Implement a timeout. There is an error condition where the state machine can stall without returning data, if this happens repeat step 2.
Given that you need something, I'll put something online as soon as I can. It'll be a few weeks, but I'll respond to this thread when I do.
Thanks @mydana. I discovered the hard way how hard DMX actually is to read. Kind of explains the lack of libraries out there.
One library I had working temporarily was an Arduino one Pico-DMX
for Raspberry Pi Pico. I don't know why it stopped working, but the Pico kept restarting and I had to ditch it.
In the end, I ended up hooking up my Arduino Uno to the DMX Shield and shooting the data through to the Pico via a 115200 baud software serial (Arduino end) connection (slower than DMX). The Arduino Uno based libraries seem to be much more stable. Must be to do with the more robust timing programming.
Appreciate your efforts on this one. No need to rush any more. It would have been nice to have it working at some stage.
Hi @wallarug I have an experimental library that reads DMX, and I will put it onto GitHub for you, but it will take a few weeks before I can make the time for doing that.
The assembly code that does this listens for the sequence of the BREAK, MARK AFTER BREAK, and NULL START Code, and then follows some assembly code Voodoo to ignore a specified number of slots, then capturing a sequence of 16 or 32 slots, after which it stalls. Fitting this in 32 operations is not straightforward at all.
The Python interface works in three steps: 1. Initialize the Python object and the PIO state machine. 2. Direct the PIO to listen to the DMX stream. 3. Poll the Python object for any available data. Repeat steps 2 and 3 to feed your animation. Your Python will also need to Implement a timeout. There is an error condition where the state machine can stall without returning data, if this happens repeat step 2.
Given that you need something, I'll put something online as soon as I can. It'll be a few weeks, but I'll respond to this thread when I do.
Hello, very interested in this too. I’m trying to make a DMX receiver now, but it’s not really working, apparently I don’t have enough knowledge
I haven't forgotten about this. I'm starting work on this now.
https://github.com/mydana/CircuitPython_DMX_Receiver
It's still a bit buggy, but would love feedback.
Hey @mydana
Just wondering what the CircuitPython options are with RP2040 and becoming a DMX Slave?
I have two of these...https://littlebirdelectronics.com.au/products/arduino-dmx-shield
I just need to be able to read in the values from certain channels using CircuitPython.
Any help would be great.