PiSupply / Pi-Supply-Switch

Pi Supply Switch On/Off Switch for Raspberry Pi
https://www.pi-supply.com/product/pi-supply-raspberry-pi-power-switch/
Other
58 stars 17 forks source link

Use GPIO14 instead? #16

Closed opjose closed 4 years ago

opjose commented 4 years ago

I found this comment on another forum about GPIO.

"The one exception might be your pin 15, which looks like it must be GPIO14. However, this pin isn't a GPIO at startup - it's TxD, the serial transmit line - which may well be pulled high for normal TX operation. The TxD line won't become GPIO14 (and therefore go low) until you run your script that enables all 17 lines as GPIOs."

"As I learned from the forums, I use an LED hooked up to GPIO14 and mounted on my chassis to notify me when the pi has completely shut down (The LED is lit at boot and is turned off at shutdown after the files systems have been unmounted."

That being the case wouldn't it be better to use the GPIO14 (TxD) pin which appears to remain high during boot, then initialize it in the script as a GPIO line and immediately pull it high in the script?

That way if the user is NOT running the script but has connected the board to GPIO14, they will not experience shutdowns during or after the boot sequence...

Would that work?

Thanks.

shawaj commented 4 years ago

Yes you can do this no problem.

See here https://github.com/PiSupply/Pi-Supply-Switch/blob/master/README.md#installation

Just change the line PinEight = 11 to PinEight = 8