Is there a way to have the HAT power on by itself after a power failure without having to press the button?
Of course, there is.
Run the following Python script:
import time import RPi.GPIO as GPIO POWERKEY = 24 GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) GPIO.setup(POWERKEY, GPIO.OUT) try: GPIO.output(POWERKEY,1) time.sleep(5) GPIO.output(POWERKEY,0) time.sleep(5) except: print("Error") finally: print("Clean up") GPIO.cleanup()
I hate to differ, but this does not solve the issue.
Could you please explain when this script is supposed to run and what it is supposed to do.
I understand that it is setting up the GPIO in BCM (pin alias mode) to basically push the power key.
How is this supposed to power on the Pi when the Pi can’t actively run this code?
Could you please clarify?
Could you clarify where and how this code is supposed to be run?
My apologies for the delay in responding.
This code is used to turn on the module without having to press the button for the Tracker HAT.
Thanks @ensar, that makes a lot more sense now. I missed the subforum I was in, I think.
Is there a way to have the HAT power ON even without interfering with GPIO programmatically?
Is the a way to solve this need on a hardware level?
I have another HAT on RPI which interfering with GPIO and not working because I use GPIO programmatically for Cellular IoT HAT.
thanks in advance,