Page 14 of 17

Re: On-Screen Battery Monitor Options

Posted: Wed Sep 26, 2018 9:27 am
by goosewerks
Peeked through code as mentioned above, and have no idea what I'm looking for in the code. Is there a specific enable?? I see that holding "SELECT" for 2 seconds should enable it, but it only toggles the screensaver on/off. While playing TMNT and button mashing, the monitor disappeared. Not sure what was pressed, but the only way I've been able to fix it to display the icon is to reinstall the image. Anyone care to shed more light on this? As said before, the low battery monitor still works, appears, and will eventually shutdown. Anything other than the LOW battery icon will no longer display.

EDIT: Found Button_19, which is also set to "Y". Turns out holding "Y" for 2 seconds will enable or disable the battery monitor. Thanks for the hints so long ago :lol:

Re: On-Screen Battery Monitor Options

Posted: Thu Sep 27, 2018 3:06 pm
by rodocop
goosewerks wrote:
Wed Sep 26, 2018 9:27 am
Peeked through code as mentioned above, and have no idea what I'm looking for in the code. Is there a specific enable?? I see that holding "SELECT" for 2 seconds should enable it, but it only toggles the screensaver on/off. While playing TMNT and button mashing, the monitor disappeared. Not sure what was pressed, but the only way I've been able to fix it to display the icon is to reinstall the image. Anyone care to shed more light on this? As said before, the low battery monitor still works, appears, and will eventually shutdown. Anything other than the LOW battery icon will no longer display.

EDIT: Found Button_19, which is also set to "Y". Turns out holding "Y" for 2 seconds will enable or disable the battery monitor. Thanks for the hints so long ago :lol:
Also, FYI, you can change that value to any other GPIO as well, if you want a different buttons to toggle the monitor on/off and shutdown.

Re: On-Screen Battery Monitor Options

Posted: Mon Oct 01, 2018 12:40 pm
by goosewerks
rodocop wrote:
Thu Sep 27, 2018 3:06 pm
goosewerks wrote:
Wed Sep 26, 2018 9:27 am
Peeked through code as mentioned above, and have no idea what I'm looking for in the code. Is there a specific enable?? I see that holding "SELECT" for 2 seconds should enable it, but it only toggles the screensaver on/off. While playing TMNT and button mashing, the monitor disappeared. Not sure what was pressed, but the only way I've been able to fix it to display the icon is to reinstall the image. Anyone care to shed more light on this? As said before, the low battery monitor still works, appears, and will eventually shutdown. Anything other than the LOW battery icon will no longer display.

EDIT: Found Button_19, which is also set to "Y". Turns out holding "Y" for 2 seconds will enable or disable the battery monitor. Thanks for the hints so long ago :lol:
Also, FYI, you can change that value to any other GPIO as well, if you want a different buttons to toggle the monitor on/off and shutdown.
Yep! Changed it to the right GPIO value for SELECT and it works just like it's supposed to work. The shutdown trigger also works, but I don't ever use it.

Re: On-Screen Battery Monitor Options

Posted: Mon Oct 08, 2018 6:00 pm
by goosewerks
sixteenbit wrote:
Sun Apr 22, 2018 4:25 pm
Has anyone had any issues with this stopping from working after a while? I'm using ADS1115 and it works fine for a week or so then stops. If i do a fresh install of retropie and the script it works again.
In MintyShutdown.py go to the end and change the GPIO pin value for enable monitor. Same problem with mine finally fixed it.

Re: On-Screen Battery Monitor Options

Posted: Fri Oct 12, 2018 6:27 am
by Merlin
Thanks for this thread!
I added an ADS1015 to my build too.
I already had a Safe Shutdown board by Camble (Banggood ed.) used to safe shutdown the gbz (but with battery monitor part disabled because it hangs the system)
So,first of all I completely removed Camble's Safe Power Monitor script and installed Mintybatterymonitor by HoolyHoo.
Then modded a little bit the script to works in combination to Safe Shutdown board and his power switch,without adding more physical buttons.

for those interested...(only if you are in mine condition: Camble's Safe shutdown Banggood ed. + asd1015)

Be sure to have the line: dtoverlay=gpio-poweroff:gpiopin=22,active_low="y" in your config.txt file

To use the power switch to shutdown the system:

Edit the MintyShutdown.py file

in line 46 change "shutdown_btn = Button(7, hold_time=1)" to "shutdown_btn = Button(27, pull_up=False, hold_time=0.3)"
Because GPIO 27 is the pin used by Safe Shutdown to issue a shutdown command and it needs to be pulled down, so it can go in high state when the switch is triggered.
Hold time reduced to 1 seconds to 0.3 seconds to have a fast response when the switch is moved to off position.

in line 47 "monitor_btn = Button(19, hold_time=2)" you can change 19 to any other button.
I used button 11 that for my setup corresponds to START button.
So when I hold START the battery icon will show up (and the emulationstation menu also appear because it use the same button,however this not go in conflict in any way with adafruit retrogame script)

Save and reboot

After this you have safe shutdown capability, onscreen battery monitoring and video alert...all toghether that works like a charm!

Re: On-Screen Battery Monitor Options

Posted: Sun Oct 28, 2018 7:58 am
by 7dave7
Merlin wrote:
Fri Oct 12, 2018 6:27 am

Be sure to have the line: dtoverlay=gpio-poweroff:gpiopin=22,active_low="y" in your config.txt file
Hi, I would like ta ask you where the config.txt file is located.

Thnx

Re: On-Screen Battery Monitor Options

Posted: Sun Oct 28, 2018 6:12 pm
by rodocop
/boot/config.txt

Re: On-Screen Battery Monitor Options

Posted: Sat Nov 10, 2018 12:43 pm
by Ziploc99
Merlin wrote:
Fri Oct 12, 2018 6:27 am
Thanks for this thread!
I added an ADS1015 to my build too.
I already had a Safe Shutdown board by Camble (Banggood ed.) used to safe shutdown the gbz (but with battery monitor part disabled because it hangs the system)
So,first of all I completely removed Camble's Safe Power Monitor script and installed Mintybatterymonitor by HoolyHoo.
Then modded a little bit the script to works in combination to Safe Shutdown board and his power switch,without adding more physical buttons.

for those interested...(only if you are in mine condition: Camble's Safe shutdown Banggood ed. + asd1015)

Be sure to have the line: dtoverlay=gpio-poweroff:gpiopin=22,active_low="y" in your config.txt file

To use the power switch to shutdown the system:

Edit the MintyShutdown.py file

in line 46 change "shutdown_btn = Button(7, hold_time=1)" to "shutdown_btn = Button(27, pull_up=False, hold_time=0.3)"
Because GPIO 27 is the pin used by Safe Shutdown to issue a shutdown command and it needs to be pulled down, so it can go in high state when the switch is triggered.
Hold time reduced to 1 seconds to 0.3 seconds to have a fast response when the switch is moved to off position.

in line 47 "monitor_btn = Button(19, hold_time=2)" you can change 19 to any other button.
I used button 11 that for my setup corresponds to START button.
So when I hold START the battery icon will show up (and the emulationstation menu also appear because it use the same button,however this not go in conflict in any way with adafruit retrogame script)

Save and reboot

After this you have safe shutdown capability, onscreen battery monitoring and video alert...all toghether that works like a charm!
I'm having a little trouble with working out how to wire the ads1015 with camble's safe shutdown board. I have a PB1000c, so it's a little different but could you share your wiring, I'd appreciate it. The software side changes above I understand. Thanks for figuring this out as I already have camble's board installed and wanted to add OSD battery.

Thanks

Re: On-Screen Battery Monitor Options

Posted: Mon Nov 12, 2018 1:15 pm
by Merlin
I'm having a little trouble with working out how to wire the ads1015 with camble's safe shutdown board. I have a PB1000c, so it's a little different but could you share your wiring, I'd appreciate it. The software side changes above I understand. Thanks for figuring this out as I already have camble's board installed and wanted to add OSD battery.

Thanks
This is the schematic diagram that I used,you can find it at pag.7 of this thread:

Image

Re: On-Screen Battery Monitor Options

Posted: Tue Dec 11, 2018 12:23 pm
by hueblo
Ziploc99 wrote:
Sat Nov 10, 2018 12:43 pm
Merlin wrote:
Fri Oct 12, 2018 6:27 am
Thanks for this thread!
I added an ADS1015 to my build too.
I already had a Safe Shutdown board by Camble (Banggood ed.) used to safe shutdown the gbz (but with battery monitor part disabled because it hangs the system)
So,first of all I completely removed Camble's Safe Power Monitor script and installed Mintybatterymonitor by HoolyHoo.
Then modded a little bit the script to works in combination to Safe Shutdown board and his power switch,without adding more physical buttons.

for those interested...(only if you are in mine condition: Camble's Safe shutdown Banggood ed. + asd1015)

Be sure to have the line: dtoverlay=gpio-poweroff:gpiopin=22,active_low="y" in your config.txt file

To use the power switch to shutdown the system:

Edit the MintyShutdown.py file

in line 46 change "shutdown_btn = Button(7, hold_time=1)" to "shutdown_btn = Button(27, pull_up=False, hold_time=0.3)"
Because GPIO 27 is the pin used by Safe Shutdown to issue a shutdown command and it needs to be pulled down, so it can go in high state when the switch is triggered.
Hold time reduced to 1 seconds to 0.3 seconds to have a fast response when the switch is moved to off position.

in line 47 "monitor_btn = Button(19, hold_time=2)" you can change 19 to any other button.
I used button 11 that for my setup corresponds to START button.
So when I hold START the battery icon will show up (and the emulationstation menu also appear because it use the same button,however this not go in conflict in any way with adafruit retrogame script)

Save and reboot

After this you have safe shutdown capability, onscreen battery monitoring and video alert...all toghether that works like a charm!
I'm having a little trouble with working out how to wire the ads1015 with camble's safe shutdown board. I have a PB1000c, so it's a little different but could you share your wiring, I'd appreciate it. The software side changes above I understand. Thanks for figuring this out as I already have camble's board installed and wanted to add OSD battery.

Thanks
Below is the wiring I used for my Adafruit 1000c with the shutdown switch.
Image