Mintybatterymonitor Questions

General GBZ-related chat goes here. Share ideas, tips and tricks, or ask questions that don't fit into the hardware/software help forums.
Post Reply
agonzalez2718
Posts: 4
Joined: Thu May 10, 2018 9:50 pm
Has thanked: 4 times
Been thanked: 1 time

Mintybatterymonitor Questions

Post by agonzalez2718 » Tue Feb 19, 2019 1:11 pm

Hello All,
I have a question about the Battery monitor by Hoolyhoo. First of all I want to thank hoolyhoo for the battery monitor script he created. I'm sure it took a lot of work and time to create it. I installed the battery monitor on a gameboy zero using an ADS1015 board. It works good and all but when it comes to playing SNES games like Super Mario World, where I have to press and hold the y button for running the battery icon disappears and the game begins to lag quite a bit. It also happens when playing any shooting game that I have to press the X and Y buttons a lot. Is there anyway to map the buttons that activate and deactivate the battery icon to use another button like select or maybe another individual button I can install like in the battery bay that I can press if I dont want to see the battery icon? Thanks in advance for the help.
Alex :)

User avatar
rodocop
Posts: 1723
Joined: Mon Aug 22, 2016 3:14 pm
Location: Saskatchewan
Has thanked: 606 times
Been thanked: 608 times

Re: Mintybatterymonitor Questions

Post by rodocop » Thu Feb 21, 2019 11:24 am

Yeah. Check out the MintyShutdown.py

Edit that file. To use different gpio pins. You can see the file below. Scroll to the bottom to see the 2 gpios that can be altered.

I always use L and R in my builds and change the hold time to 5. That way when I hold L it will shut down the pi safely, and holding R will turn the battery icon off).

You can also change them to unused gpios if you dont want to worry about accidentally activating them. Or add some new buttons like you mentioned.

https://github.com/HoolyHoo/Mintybatter ... hutdown.py

agonzalez2718
Posts: 4
Joined: Thu May 10, 2018 9:50 pm
Has thanked: 4 times
Been thanked: 1 time

Re: Mintybatterymonitor Questions

Post by agonzalez2718 » Thu Feb 21, 2019 12:23 pm

What do I type in putty to access it. I tried sudo nano /MintyBatteryMonitor.py but it didnt work. Sorry Im still learning all this coding for raspberry Pi.

User avatar
rodocop
Posts: 1723
Joined: Mon Aug 22, 2016 3:14 pm
Location: Saskatchewan
Has thanked: 606 times
Been thanked: 608 times

Re: Mintybatterymonitor Questions

Post by rodocop » Thu Feb 21, 2019 12:57 pm

You have to make sure you also have the path 8n front if it.

So
sudo nano /home/pi/Mintybatterymonitor/MintyShutdown.py

agonzalez2718
Posts: 4
Joined: Thu May 10, 2018 9:50 pm
Has thanked: 4 times
Been thanked: 1 time

Re: Mintybatterymonitor Questions

Post by agonzalez2718 » Thu Feb 21, 2019 3:14 pm

Rodocop, Thank you. I really appreciate your help. It works perfect now. I changed the battery monitor from GPIO 19 to 23 which is not being used and all buttons work flawless. I like the battery icon on the screen. My next build I will add a button in the battery bay using GPIO 23 to turn it off but for now I love it. I also like the fact that I can add a button for safe shutdown using GPIO 7. Maybe I will add it as well. Thanks again.
Alex

User avatar
rodocop
Posts: 1723
Joined: Mon Aug 22, 2016 3:14 pm
Location: Saskatchewan
Has thanked: 606 times
Been thanked: 608 times

Re: Mintybatterymonitor Questions

Post by rodocop » Thu Feb 21, 2019 7:13 pm

agonzalez2718 wrote:
Thu Feb 21, 2019 3:14 pm
Rodocop, Thank you. I really appreciate your help. It works perfect now. I changed the battery monitor from GPIO 19 to 23 which is not being used and all buttons work flawless. I like the battery icon on the screen. My next build I will add a button in the battery bay using GPIO 23 to turn it off but for now I love it. I also like the fact that I can add a button for safe shutdown using GPIO 7. Maybe I will add it as well. Thanks again.
Alex
Good to hear it's working good for you. And by the way, you can use any gpio for the safe shutdown. It does not have to be 7. (Like I mentioned I often just use L or R for the safe shutdown and make the hold time longer, so you can't accidentially trigger it) this is assuming you are already using gpio controls I guess. If not, yeah, you'll need to add a seperate button.

agonzalez2718
Posts: 4
Joined: Thu May 10, 2018 9:50 pm
Has thanked: 4 times
Been thanked: 1 time

Re: Mintybatterymonitor Questions

Post by agonzalez2718 » Fri Feb 22, 2019 3:09 pm

Yes I am using GPIO for controls. Let me assign the safe shut down to one of the GPIOs I am using and see how it works. Thanks again for all your help.
Alex

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest