LED Status light hooked up to Tx GPIO pin. Can I make it blink?
-
Hello.
I'm using the popular method of hooking an LED up to the GPIO Tx pin to show power status of my RetroPie. I then have a button also hooked up to the GPIO to run a shutdown script when it's pressed.
When I press the button, the script runs properly, but there is a few second lag between the button being pressed and the Pi shutting down and the status LED turning off. I'd like to modify the script such that the LED blinks to give feedback that the button press has been recognised and the Pi is going through its shutdown sequence.
Since it's using the Tx pin, I don't have the same access as with other GPIO pins to simply turn it off and on using a timer, but I was wondering if there were a way to send serial messages instead or some other creative means which would trigger toggling the voltage on the pin.
This is on a Raspberry Pi 3B+, and I'm using a python shutdown script very similar to the one detailed here:
https://howchoo.com/g/mwnlytk3zmm/how-to-add-a-power-button-to-your-raspberry-piLED is hooked up as outlined here:
https://howchoo.com/g/ytzjyzy4m2e/build-a-simple-raspberry-pi-led-power-status-indicatorAppreciate the help!
- Jeff
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.