01 July 2013

Another DMXSerial example

The DMXSerial library for the Arduino that you can find at http://www.mathertel.de/Arduino/DMXSerial.aspx has only 2 small examples that show the principle functionality of the DMX library:

  • DMXSerialRecv implements a 3 channel DMX device on channel 1-3 and sends the data to the PWM output pins 9, 6 and 5.
    It also shows the usage of the DMXSerial.noDataSince method.
  • DMXSerialSend implements a 3 channel DMX Controller sending a continuously changing color schema to the channels 1 to 3.
    Here an array of color definition is used and the implementations adjusts the current color smoothly into the next color from the arrays.

Now there is a new example available:

DMXSerialFlow implements a 60 (20*3) channel DMX Controller sending a continuously changing colors schema to the channels 1 to 3.

The calculation of the colors is done by using a hue to rgb converter.

Hue is a number from 0 to 764 that represents one of the colors of a color wheel. With a simple algorithm it is possible to calculate the red,green and blue component of it.

There are some hints inside the code that allows you to make some changes for example the speed of the color changing.

This example was used for testing a wireless 2.4 GHz DMX transceiver that I am working on right now. Stay tuned :-)