Watch dog for WS2812 type devices to blank display when no incoming data

By design WS2812 type LEDs remember their state if the microcontroller ceases communication due to a reboot/firmware update or program freeze.

Is there a way to get them to auto-switch off if there is no incoming data for a period of x milliseconds?

If you mean have the LEDs do this themselves, regardless what the MCU is doing? No, they don't have such a feature.

For reset/firmware upload, you can clear and update the LEDs in setup().

For program freeze, perhaps you could use the MCU watchdog timer to clear the LEDs...

The led strips don't have a reset pin. You could turn off the power, but that would be weird :confused:
It is normal to clear the leds in setup(). So I don't see a problem when resetting the Arduino or uploading a new sketch.

You can use millis() to make a timeout in the sketch. When for example nothing is received from a serial communication, then turn off the lights after some time.

What is causing the Arduino to freeze ? I think you should fix that first.

This topic was automatically closed after 95 days. New replies are no longer allowed.