User Tools

Site Tools


p:dmx:program
Please note, that this is an old archived version of this site. Check out the new version at andunix.net!

Program

The controller (Arduino) can be programmed to animate the value on a DMX channel from one value to another. The contoller has an program counter which is counted up by one every iteration. The iterations will be 5ms (200Hz), 10ms (100 Hz) or 20ms (50 Hz) long. The value of the program counter ist exchanged between the host an the controller with the command "C" (counter).

Program Storage

To store the programs, an array of the following structure is reserved:

  • uint16 flags, function & channel
    • 0-9 (0x01FF) - channel: the DMX channel
    • 10 (0x0200) - dual-channel: program for a 16bit value over two DMX channels
    • 11+12 (0x0C00) - function
      • 0 (0x0000) - linear
      • 1 (0x0400) - eased
      • 2 (0x0800) - reserved
      • 3 (0x0C00) - reserved
    • 13 (0x1000) - reserved
    • 14 (0x2000) - reserved
    • 15 (0x4000) - reserved
    • 16 (0x8000) - inactive: this program slot is unused
  • uint16 start_counter
  • uint8 start_value
  • uint8 end_value
  • uint8 duration

This results in seven bytes per structure. If there are 128 program slots, this will take 896bytes of RAM.

p/dmx/program.txt · Last modified: 2014-02-02 12:02 by andunix