Hi,
Does the board charge the battery if the Pi is connected to an external power supply?
I sourced the below script to monitor a GPIO in for high signal, but currently do not have a LiPo charger to charge my battery to test, would it work ?
import RPi.GPIO as GPIO
import os
gpio_pin_number=4
GPIO.setmode(GPIO.BCM)
GPIO.setup(gpio_pin_number, GPIO.IN, pull_up_down=GPIO.PUD_UP)
try:
GPIO.wait_for_edge(gpio_pin_number, GPIO.RISING)
os.system("sudo shutdown -h now")
except:
pass
GPIO.cleanup()
Thanks