toggle LOW Battery LED / screensaver battery display

Please check here for help solving common issues.
Post Reply
FlorianLR
Posts: 5
Joined: Sun 6 Dec 2020 19:59

toggle LOW Battery LED / screensaver battery display

Post by FlorianLR »

Hey,
is there a way to toggle the LOW Battery LED? As far as I figured out this isn't working yet on the latest image (RetrOrangePi_v4.3_Armbian_Retrostone2_PRO_bionic_dev_5.3.13_desktop_v3.img.7z).

I wrote a small service which displays the battery level at the screensaver display. I think it shouldn't be too complicated to lit the LOW BAT LED once the battery drops below a specified percentage. I already tried to follow the pcb track but gave up soon :)
How is the battery LED connected to the A20? Is there some register or /sys file to change the state?

If anyone is interessted in the screensaver battery display, it is available at https://github.com/florianrosenauer/rs2 ... creensaver

Florian
User avatar
Admin
Administrateur du site
Posts: 505
Joined: Sat 10 Dec 2016 13:12

Re: toggle LOW Battery LED / screensaver battery display

Post by Admin »

Hi Florian!
Thanks for your contribution!
I'll see if Retrorangepi developper can integrate it. Though he is currently not working on Retrorangepi sadly.

For the LED here are how they are connected :
Top LED = connect to VCC. So it's on as soon as the system is ON.
Middle LED = CHGLED (pin 36) of AXP209.
Bottom LED = connected to A20 GPIO PH2. This LED should be configured rather easily as it's on A20 GPIO.

Please let me know if you need anything else :)
FlorianLR
Posts: 5
Joined: Sun 6 Dec 2020 19:59

Re: toggle LOW Battery LED / screensaver battery display

Post by FlorianLR »

Hi,
perfect, thats exactly the information I was looking for. As far as I can see the Armbian and RetrOrangepie Image is really well setup/prepared and I was already able to make the LOW BAT LED blink :) and I will integrate it into my service during the next days.
If it is integrated into the image that would be nice, at least maybe the retrorange developers can take some ideas out of my code.

Thank you
Florian
User avatar
Admin
Administrateur du site
Posts: 505
Joined: Sat 10 Dec 2016 13:12

Re: toggle LOW Battery LED / screensaver battery display

Post by Admin »

That's awesome :)
Let me know when it's up and running! I'm sure they'll integrate it if he come's back to Retrorangepi.
FlorianLR
Posts: 5
Joined: Sun 6 Dec 2020 19:59

Re: toggle LOW Battery LED / screensaver battery display

Post by FlorianLR »

I updated my project so it also sets the low battery LED now once capacity drops to 10% or lower. It can be simply installed/reinstalled by following the documentation at https://github.com/florianrosenauer/rs2 ... creensaver
tommyschnabel
Posts: 1
Joined: Mon 17 May 2021 16:07

Re: toggle LOW Battery LED / screensaver battery display

Post by tommyschnabel »

Thanks for this @FlorianLR, it works perfectly!

For anyone coming after, it's really easy to install, this is what I ran:

Code: Select all

apt install -y git
git clone https://github.com/florianrosenauer/rs2-batterystatusscreensaver.git
cd rs2-batterystatusscreensaver/src
chmod +x install.sh
About 2 seconds after the install script finished I saw the low battery LED turn off (I'm at ~80% battery rn).

Thanks again FlorianLR, great solution!
Post Reply