Page 1 of 1

toggle LOW Battery LED / screensaver battery display

Posted: Mon 14 Dec 2020 00:46
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

Re: toggle LOW Battery LED / screensaver battery display

Posted: Tue 22 Dec 2020 16:18
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 :)

Re: toggle LOW Battery LED / screensaver battery display

Posted: Sat 26 Dec 2020 00:50
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

Re: toggle LOW Battery LED / screensaver battery display

Posted: Mon 28 Dec 2020 13:45
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.

Re: toggle LOW Battery LED / screensaver battery display

Posted: Thu 4 Feb 2021 11:41
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

Re: toggle LOW Battery LED / screensaver battery display

Posted: Mon 17 May 2021 16:09
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!