Tinkerkit DMX Shield and IMP

No, I have not found a software-only solution. The imp cannot generate the fractional baud rates required for the DMX512 Break (at least running on the squirrel ‘OS’). The and-gate is a simple solution that uses another Imp pin to generate the break.

As for the timing, in my application the server cannot ever be depended upon for fade timing events. The agent sends the new level to the imp and a loop in software generates an array based on a fade rate. The Dmx is writen for each index of the array to achieve fading. Astrological events, dawn dusk, etc., can be triggered by the server with enough accuracy, but fading is tricky since the agent can’t handle requests quick enough for a smooth (and quick) fade. If sockets ever manifested within the imp universe, it would be a completely different story!

It sounds with your local “queue stack” you’ve bypassed the comms limitation.

I guess you could also have a dumb queue stack that is loaded in chunks from the server though your method is more reliable.

Have you added any other tricks to the board such a mains relay for when all the values are zero or local buttons

Really looking forward to seeing the end result

Lots of cool stuff! Can’t talk about it too much right now… But can’t wait to show it off to the imp community!!!

:slight_smile:

I’ve been tinkering with this a bit with release 30.10 on a developer device, and I’ve rewritten the DMX512 driver as a class. As with DMX before, Your Mileage May Still Vary.

I’m now able to get my break time down to about 430µs and my mark-after-break to about 80µs. Hopefully that’s now close enough that a few more devices out there will play nice.

At any rate, having the DMX code in a class makes it easier to use. It’s here:

Hey tbyrne, awesome code! Could you explain a little how one can operate this code? I haven’t used constructers before… I assume I attach this code into my device, then use function calls such a dmx.sevchannel… Upon boot-up, I assume I need to call dmx.sendframe() in order for the DMX to start transmitting. This will continue indefinitely per the frame rate? Have you testing any performance of the DMX? Have you tried fading? Also, do I need to call dmx.setchannel() for every discrete channel change? Thanks…