|
|
@ -29,8 +29,7 @@ void setup() {
|
|
|
|
Serial.println(WiFi.localIP());
|
|
|
|
Serial.println(WiFi.localIP());
|
|
|
|
|
|
|
|
|
|
|
|
artnet.begin();
|
|
|
|
artnet.begin();
|
|
|
|
// artnet.subscribe_net(0); // optionally you can change
|
|
|
|
// artnet.begin(net, subnet); // optionally you can change net and subnet
|
|
|
|
// artnet.subscribe_subnet(0); // optionally you can change
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if Artnet packet comes to this universe, this function is called
|
|
|
|
// if Artnet packet comes to this universe, this function is called
|
|
|
|
artnet.subscribe(universe, [&](const uint8_t* data, const uint16_t size) {
|
|
|
|
artnet.subscribe(universe, [&](const uint8_t* data, const uint16_t size) {
|
|
|
@ -59,6 +58,7 @@ void loop() {
|
|
|
|
value = (millis() / 4) % 256;
|
|
|
|
value = (millis() / 4) % 256;
|
|
|
|
memset(data, value, size);
|
|
|
|
memset(data, value, size);
|
|
|
|
|
|
|
|
|
|
|
|
artnet.set(universe, data, size);
|
|
|
|
artnet.streaming_data(data, size);
|
|
|
|
artnet.streaming(target_ip); // automatically send set data in 40fps
|
|
|
|
artnet.streaming(target_ip, universe); // automatically send set data in 40fps
|
|
|
|
|
|
|
|
// artnet.streaming(target_ip, net, subnet, univ); // or you can set net, subnet, and universe
|
|
|
|
}
|
|
|
|
}
|
|
|
|