Quick utility for controlling a relay unit over DMX, via an FTDI USB-to-RS485 adaptor.
Give the numbers of channels to turn on as arguments; they will be set to 200 and everything else will be set to 0.
Basically an excuse for me to finally try and use Rust for something practical, after already doing the same job in Python (slow) and C (ugly).
$ dmx-control 4
# Turn channel 4 on and everything else off
$ dmx-control +1 -4 6
# Turn channel 1 on, and channels 4 and 6 off.
# Leave everything else as it was last time (based on a file with previous state)
$ dmx-control +1 2 ^4 6
# Turn channels 1 and 2 on, and set 4 and 6 to the opposite of what 4 is currently