Turn off Blinkt! after shutdown


I recently bought a Pimoroni Blinkt!
I couldn’t be more happy with my product.
I’m currently using it as a rainbow-like decoration when I’m playing retro games on my RP0 Retropie.
I used this code @reboot sudo python /home/pi/Pimoroni/blinkt/examples/rainbow.py & (via ‘crotab -e’) to automatically turn on my Blinkt when my Raspberry Pi Zero turns on.
But my question is, when I turn off my Raspberry Pi, the lights stay on without moving, even when the Pi is completely shutdown.
**Is there another line of code to shut them of when the system is off? **
Thanks in advance!

  • Victor

a crontab will not cleanly exit AFAIK. You would have to create a service and the script should contain a clean up routine… see here for some pointers:

Blinkt retropie auto stop script help

1 Like