RetrOrangePi Official Forum
Battery - Printable Version

+- RetrOrangePi Official Forum (http://retrorangepi.download/forum)
+-- Forum: Latest Release (http://retrorangepi.download/forum/forumdisplay.php?fid=3)
+--- Forum: RetrOrangePi v4.3 (http://retrorangepi.download/forum/forumdisplay.php?fid=41)
+---- Forum: Retrostone2 (http://retrorangepi.download/forum/forumdisplay.php?fid=44)
+---- Thread: Battery (/showthread.php?tid=3503)

Pages: 1 2


Battery - Jole - 04-30-2020

Just wondering how to check the status of my battery’s charge? As of now  now I’m having to turn my retrostone 2 off and on just to check my battery percentage when it shows it on boot up.


RE: Battery - CISKO - 04-30-2020

no way until that they enable a indicator by software. It is inadmissible that it does not have it by default.
Meanwhile, I have a script inside the retropiemenu to see it.


RE: Battery - alexkidd - 04-30-2020

what it's inadmissible is to complain for a software feature you didnt pay for. You purchased hardware that relies on open source software, mostly developed by people on their spare time. Pierre is supporting us and other developers to bring new features. So please be patient. Battery indicator and other features are work in progress.


RE: Battery - alexkidd - 04-30-2020

on topic:

like @CISKO did, you can add a script to the menu.

From terminal (make sure to enable wifi from RetrOrangePi - Wifi submenu before)

cd RetrOrangePi
wget http://www.retrorangepi.org/Battery.sh
chmod +x Battery.sh

Reboot or press Ctrl D to return to ES


RE: Battery - CISKO - 04-30-2020

I know, I did not want to be offensive, your job is huge, but it was said at first that there would be an indicator.
We will be patient  Wink


RE: Battery - Strider - 04-30-2020

Alexkidd has mentioned a few times that the battery indicator light not working is a hardware issue. You can try contacting Pierre about it but good luck. He seems to have moved on to other projects.


RE: Battery - alexkidd - 04-30-2020

I think they meant a battery overlay on the frontend, feature absent on RetroPie's EmulationStation.
We're trying other alternatives.


RE: Battery - Jole - 05-01-2020

I was indeed looking to ask about it on the software side, was hoping there was a way to access the battery information shown on boot up from the terminal. I’ll go ahead with that advice to try and install the battery.sh script. Thank you for the help Alexkiddd having the forum for support is really a nice lifeline for those new to Linux and Retropie.


RE: Battery - Pat Kite - 05-05-2020

My Battery.sh

Code:
#!/bin/bash
SERVICE='fbi'
BATTERY_PACK=$(cat /sys/class/power_supply/axp20x-battery/capacity)
convert /home/pi/RetroPie/retropiemenu/RetrOrangePi/battery_background.jpg -gravity center -font FreeSans \
    -pointsize 60 -stroke '#000C' -strokewidth 4 -annotate 0 "battery status: $BATTERY_PACK%" -undercolor '#00000080' \
    -stroke  none -fill white -annotate 0 "battery status: $BATTERY_PACK%" \
    -gravity south -font FreeSans \
    -pointsize 40 -stroke '#000C' -strokewidth 4 -annotate 0 "press a button" -undercolor '#00000080' \
    -stroke  none -fill white -annotate 0 "press a button" /home/pi/RetroPie/retropiemenu/RetrOrangePi/battery.jpg
fbi -a -noverbose /home/pi/RetroPie/retropiemenu/RetrOrangePi/battery.jpg
if ps ax | grep $SERVICE > /dev/null
    then sudo killall -q $SERVICE
fi

place the picture in attachment "battery_background.jpgin your "/home/pi/RetroPie/retropiemenu/RetrOrangePi/" folder

example output:

 [Image: attachment.php?aid=400]


RE: Battery - alexkidd - 05-05-2020

awesome!
if you're creating Battery.sh from scratch, dont forget to give it execute permission:
chmod +x Battery.sh