update examples

master
Hideaki Tai 4 years ago
parent bedd52af4e
commit bf0a355273

@ -22,8 +22,7 @@ void setup() {
Ethernet.begin(mac, ip);
artnet.begin();
// artnet.subscribe_net(0); // optionally you can change
// artnet.subscribe_subnet(0); // optionally you can change
// artnet.begin(net, subnet); // optionally you can change
Serial.println("set subscriber");
@ -56,6 +55,7 @@ void loop() {
value = (millis() / 4) % 256;
memset(data, value, size);
artnet.set(universe, data, size);
artnet.streaming(target_ip); // automatically send set data in 40fps
artnet.streaming_data(data, size);
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
}

@ -18,6 +18,7 @@ void setup() {
Ethernet.begin(mac, ip);
artnet.begin();
// artnet.begin(net, subnet); // optionally you can change
Serial.println("start");
Serial.println(UDP_TX_PACKET_MAX_SIZE);
@ -27,6 +28,7 @@ void loop() {
value = (millis() / 4) % 256;
memset(data, value, size);
artnet.set(universe, data, size);
artnet.streaming(target_ip); // automatically send set data in 40fps
artnet.streaming_data(data, size);
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
}

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

@ -29,12 +29,14 @@ void setup() {
Serial.println(WiFi.localIP());
artnet.begin();
// artnet.begin(net, subnet); // optionally you can change net and subnet
}
void loop() {
value = (millis() / 4) % 256;
memset(data, value, size);
artnet.set(universe, data, size);
artnet.streaming(target_ip); // automatically send set data in 40fps
artnet.streaming_data(data, size);
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
}

Loading…
Cancel
Save