DMX protocol con Arduino/Genuino Zero (ARM M0)

Hello everybody,

I have an Arduino Zero and i’d like to control lights with the DMX protocol, but in my searches I’ve only found DMX libraries that compile on the Uno.

Do you know if somewhere there is a DMX library for the Zero?

If (as i’m afraid of) there isn’t such a Library do you think it’s doable to re-implement the protocol on the new board?

I find this non-compatibility between different boards very stressing.

Thanks you for your time :slight_smile:

I have no idea if there’s a Zero DMX lib or not, but if there is a library for the Uno, AND if it’s well written, it should port across to the Zero without too much work. Certainly that will be easier than starting from scratch.

And how do you port a library?

Do I need to learn the assembly code of the Zero?

The error code in particular is:

fatal error: avr/io.h: No such file or directory
#include <avr/io.h>

Any Hint?

no clue?

The DMXsimple and DMXSerial libraries are well written for AVR.

They use AVR specific UART registers and interrupts to receive and send DMX frames ( DMX has a long "mark after break" before each frame which isnt standard for UARTs, but the rest is the same. )

You wont need to go into assmebly, but will have to get familiar with the UART/USART and pin/timer interrupts on the zero ( SAMD21G18 i think ) - the datasheet is good for this, there might be an application note on using the SAMD UART /USART

you can follow what the DMXsimple and DMXSerial libraries do by reading their .cpp files to find how teh Interrupts "dance" and what you'd need to port for the SAM architecture.

A quick google search finds this library. Alas I have no Zero or DMX lights at home to test it.

Wow, good find !
I just ran out of memory on a leonardo doing DMX and lots of LEDs...