DMX on Arduino DUE (DMXSimple/DMXSerial)

Here's some code I recently wrote to transmit DMX on Teensy. Maybe it could work on Due? It uses Serial2 with only the normal functions.

You'll probably need to use the elapsedMillis.h library, since Due doesn't have this feature built in.

You'll probably also need to use a recent version of Due's core library, since this uses availableForWrite().