Crates.io | open_dmx |
lib.rs | open_dmx |
version | 1.1.1 |
source | src |
created_at | 2022-12-08 01:40:34.651491 |
updated_at | 2024-02-28 12:24:41.888709 |
description | A wrapper around the serialport library to send DMX data over a serial port |
homepage | |
repository | https://github.com/daveiator/open-dmx |
max_upload_size | |
id | 732295 |
size | 32,456 |
A wrapper around the serialport library to send DMX data over a serial port via the Open-DMX(RS-485) protocol
use open_dmx::DMXSerial;
fn main() {
let mut dmx = DMXSerial::open("COM3").unwrap();
dmx.set_channels([255; 512]);
dmx.set_channel(1, 0).unwrap();
}
DMXSerial
updates its channels automatically to the Serial Port for a stable connection. For strobe effects DMXSerial.update()
can be used, which blocks the main thread until a packet is sent over serial.
The automatic sending can also be disabled with DMXSerial::open_sync(path)
or DMXSerial.set_sync()
Works with COM-Ports on Windows and TTYPorts on Unix systems.
For linux pkg-config
and libudev
are required.