PiSupply / PiJuice

Resources for PiJuice HAT for Raspberry Pi - use your Pi Anywhere
https://uk.pi-supply.com/collections/pijuice/products/pijuice-portable-power-raspberry-pi
GNU General Public License v3.0
438 stars 104 forks source link

Pi Juice question #1094

Open TonyPdepository opened 1 month ago

TonyPdepository commented 1 month ago

The very basic part of charging and powering works on a PI5 but not getting the battery level etc via python code no because the last known code uses RPI.GPIO. The software online is 4 plus years old and PI5 RPI.GPIO does not work with it and the code is based on it. It needs to be updated to use gpiozero or coding that works on PI5 with out breaking anything. Can you or anyone help?

tvoverbeek commented 1 month ago

@TonyPdepository Your comment about RPi.GPIO and Pi5 is correct. zhowever the PiJuice Hat and PiJuice Zero do not use Rpi.GPIO. All communication is done through I2C. Works fine with a Pi5. When you look at the source code (https://github.com/PiSupply/PiJuice/blob/master/Software/Source/pijuice.py) you will find no reference to RPi.GPIO.

TonyPdepository commented 1 month ago

I have everything installed and I know it does not should up as it does in the picture. I know the software does not support wayland. Can you then provide python code to read the values then? Seems all I find is reference to RPi.GPIO. Thanks..