mirror of
https://github.com/HendrikRauh/dmx-interface.git
synced 2025-12-15 23:34:07 +00:00
finished modification of lob
This commit is contained in:
parent
4157c8a21d
commit
ab377defb5
3 changed files with 38 additions and 52 deletions
|
|
@ -18,8 +18,6 @@ ArtnetWiFi artnet;
|
|||
const uint16_t size = 512;
|
||||
uint8_t data[size];
|
||||
|
||||
int selectedId = 0;
|
||||
|
||||
void setup()
|
||||
{
|
||||
Serial.begin(9600);
|
||||
|
|
@ -55,17 +53,17 @@ void setup()
|
|||
artnet.begin();
|
||||
|
||||
// Initialize DMX ports
|
||||
dmx.init(0, 19, -1);
|
||||
dmx1.init(19, -1);
|
||||
|
||||
// if Artnet packet comes to this universe, this function is called
|
||||
artnet.subscribeArtDmxUniverse(universe, [&](const uint8_t *data, uint16_t size, const ArtDmxMetadata &metadata, const ArtNetRemoteInfo &remote)
|
||||
{
|
||||
for (size_t i = 0; i < size; ++i)
|
||||
{
|
||||
dmx.write(selectedId, (i + 1), data[i]);
|
||||
dmx1.write((i + 1), data[i]);
|
||||
}
|
||||
|
||||
dmx.update(selectedId); });
|
||||
dmx1.update(); });
|
||||
|
||||
// if Artnet packet comes, this function is called to every universe
|
||||
artnet.subscribeArtDmx([&](const uint8_t *data, uint16_t size, const ArtDmxMetadata &metadata, const ArtNetRemoteInfo &remote) {});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue