Closed erasmudj closed 2 years ago
I managed to solve it running this code every 1000ms using mills not delay.
if (currentMillis - previousMillis >= interval) { // save the last time you check communication previousMillis = currentMillis; bool artnetoff = artnet.read(); if (!artnetoff) { artnetoffcount++; } else { artnetoffcount = 0; } } if (artnetoffcount > 4) { // must be off for 5 minutes // set led or what ever to show artnet is down } else { // set led or what ever to show artnet if working }
Is it possible to set set a LED for when a packet is received (Green LED) and when no packet received (Red LED)?