Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Battery
#11
@Jole:
EDIT the "/opt/retropie/configs/all/autostart.sh".
See:
Code:
#!/bin/bash
stty -echo
SERVICE='fbi'
      if ps ax | grep $SERVICE > /dev/null
  then
      sudo killall -q $SERVICE
      fi
while pgrep mpv &>/dev/null;
do sleep 1;
done

#display battery status for 5 sec before ES start
BATTERY_PACK=$(cat /sys/class/power_supply/axp20x-battery/capacity)
BATTERY_STATUS=$(cat /sys/class/power_supply/axp20x-battery/status)
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%\n$BATTERY_STATUS" -undercolor '#00000080' \
    -stroke  none -fill white -annotate 0 "battery status: $BATTERY_PACK%\n$BATTERY_STATUS" /home/pi/RetroPie/retropiemenu/RetrOrangePi/battery.jpg
fbi -a -noverbose -t 5 --once /home/pi/RetroPie/retropiemenu/RetrOrangePi/battery.jpg
if ps ax | grep $SERVICE > /dev/null
    then sudo killall -q $SERVICE
fi
#end of display battery status

sudo rmmod brcmfmac;
pulseaudio --start;
python /home/pi/RetrOrangePi/Background_Music/bgmusic.py &
/opt/retropie/supplementary/emulationstation/emulationstation.sh;
stty echo;
sudo pkill -f bgmusic.py


this show you the battery status for 5 sec. because no buttons work in this bootlevel
dont forget to copy the picture in last post "battery_background.jpg" in your "/home/pi/RetroPie/retropiemenu/RetrOrangePi/" folder
Reply


Messages In This Thread
Battery - by Jole - 04-30-2020, 05:55 PM
RE: Battery - by CISKO - 04-30-2020, 06:44 PM
RE: Battery - by alexkidd - 04-30-2020, 07:12 PM
RE: Battery - by alexkidd - 04-30-2020, 07:27 PM
RE: Battery - by CISKO - 04-30-2020, 07:29 PM
RE: Battery - by Strider - 04-30-2020, 08:25 PM
RE: Battery - by alexkidd - 04-30-2020, 08:32 PM
RE: Battery - by Jole - 05-01-2020, 05:00 PM
RE: Battery - by Pat Kite - 05-05-2020, 02:38 PM
RE: Battery - by alexkidd - 05-05-2020, 03:51 PM
RE: Battery - by Pat Kite - 05-07-2020, 09:01 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Low battery led always ON MedioPollo30 3 901 04-08-2020, 08:25 AM
Last Post: Jackie Lee

Forum Jump:


Users browsing this thread: 1 Guest(s)