open_dmx 1.1.1

A wrapper around the serialport library to send DMX data over a serial port
Documentation
1
2
3
4
5
6
7
use open_dmx::{DMXSerial, DMX_CHANNELS};
fn main() {
    let mut dmx = DMXSerial::open("COM3").unwrap();
    let mut channels = [0; DMX_CHANNELS];
    channels.iter_mut().enumerate().for_each(|(i, value)| *value = if i % 2 == 0 { 255 } else { 0 });
    dmx.set_channels(channels);
}