On-Screen Battery Monitor Options

General GBZ-related chat goes here. Share ideas, tips and tricks, or ask questions that don't fit into the hardware/software help forums.
User avatar
Patrizio
Posts: 5
Joined: Mon Mar 18, 2019 12:15 am
Has thanked: 3 times
Been thanked: 3 times

Re: On-Screen Battery Monitor Options

Post by Patrizio » Tue May 14, 2019 11:08 pm

rodocop wrote:
Tue May 14, 2019 5:41 pm
Hmm. I would try to bypass the a0 on the pcb. Try wiring a0 on the ads1015 direct to the b+ out on the tp4056 and see if that helps. Is there any other scripts running that might be causing interference?

Also, can you confirm, are you using an ads1015, or 1115, since the 1115 would need modification to the script too.
Confirmed, I'm using ads1015.
I spoke with another user that made the same build and he had the same issues as well.
Eventually, he ended up installing Helder/Bluup's OneInAll script found here: https://github.com/Helder1981/OneForAll
I installed it too and it seems to work fine. I'm currently testing it to see if the battery icon color changes.

I may try to figure what's going on with the other script since it should work as well, but for now, I'll keep the OneInAll.

Thanks so much for your help!

User avatar
infinitLoop
Posts: 372
Joined: Mon Dec 24, 2018 11:46 am
Has thanked: 157 times
Been thanked: 126 times
Contact:

Re: On-Screen Battery Monitor Options

Post by infinitLoop » Wed May 15, 2019 9:46 am

Patrizio wrote:
Tue May 14, 2019 11:08 pm
I may try to figure what's going on with the other script since it should work as well, but for now, I'll keep the OneInAll.
so, this might be super obvious, but one thing i've found to help reveal what's going wrong in the minty battery script, is to exit emulationstation on the gameboy. frequently whatever error it had will be (briefly) displayed onscreen. it's almost always a gpio conflict with something enabled in the config or something else setting or watching the pins. when it can't read the i2c, you get a message saying that's not found (so, likely, you have the 1115 not the 1015). it's hard to find those if you're remoting in to do your changes and debugging.

User avatar
Patrizio
Posts: 5
Joined: Mon Mar 18, 2019 12:15 am
Has thanked: 3 times
Been thanked: 3 times

Re: On-Screen Battery Monitor Options

Post by Patrizio » Sat May 18, 2019 1:32 pm

infinitLoop wrote:
Wed May 15, 2019 9:46 am
Patrizio wrote:
Tue May 14, 2019 11:08 pm
I may try to figure what's going on with the other script since it should work as well, but for now, I'll keep the OneInAll.
so, this might be super obvious, but one thing i've found to help reveal what's going wrong in the minty battery script, is to exit emulationstation on the gameboy. frequently whatever error it had will be (briefly) displayed onscreen. it's almost always a gpio conflict with something enabled in the config or something else setting or watching the pins. when it can't read the i2c, you get a message saying that's not found (so, likely, you have the 1115 not the 1015). it's hard to find those if you're remoting in to do your changes and debugging.
Well, it is not super obvious and I agree with you that it's helpful to look at those logs.
One thing that I found difficult in the past was not to have enough time to read those error messages because they stay on for a very small amount of time. I only recently found out about this command:

Code: Select all

tail -n 100 /var/log/syslog

You can replace the 100 with the number of lines that you want to show from the syslog.

For this specific issue tho, I could get any help from it.
I'm also experiencing other unrelated issues on this sd image, so I may start fresh from a new image and try the minty battery script again.

User avatar
infinitLoop
Posts: 372
Joined: Mon Dec 24, 2018 11:46 am
Has thanked: 157 times
Been thanked: 126 times
Contact:

Re: On-Screen Battery Monitor Options

Post by infinitLoop » Sat May 18, 2019 5:20 pm

Patrizio wrote:
Sat May 18, 2019 1:32 pm
Well, it is not super obvious and I agree with you that it's helpful to look at those logs.
One thing that I found difficult in the past was not to have enough time to read those error messages because they stay on for a very small amount of time. I only recently found out about this command:

Code: Select all

tail -n 100 /var/log/syslog

You can replace the 100 with the number of lines that you want to show from the syslog.
awesome. thanks! i've just resorted to taking an iphone pic when it's too long to read :D

User avatar
Patrizio
Posts: 5
Joined: Mon Mar 18, 2019 12:15 am
Has thanked: 3 times
Been thanked: 3 times

Re: On-Screen Battery Monitor Options

Post by Patrizio » Sat May 18, 2019 10:30 pm

infinitLoop wrote:
Sat May 18, 2019 5:20 pm
Patrizio wrote:
Sat May 18, 2019 1:32 pm
Well, it is not super obvious and I agree with you that it's helpful to look at those logs.
One thing that I found difficult in the past was not to have enough time to read those error messages because they stay on for a very small amount of time. I only recently found out about this command:

Code: Select all

tail -n 100 /var/log/syslog

You can replace the 100 with the number of lines that you want to show from the syslog.
awesome. thanks! i've just resorted to taking an iphone pic when it's too long to read :D
Same here :lol: I have been doing the same since a few days ago until I found out about this.

User avatar
Konek
Posts: 4
Joined: Wed Jul 03, 2019 11:14 pm
Has thanked: 1 time
Been thanked: 1 time

Re: On-Screen Battery Monitor Options

Post by Konek » Mon Jul 15, 2019 11:46 am

Can we move the icon location and change it size? I'm using rpi3b+ with 7" official touch screen and would like to move it to top right hand corner with smaller size icon. Default icon size is little big and off a bit to left of that corner.

User avatar
rodocop
Posts: 1628
Joined: Mon Aug 22, 2016 3:14 pm
Location: Saskatchewan
Has thanked: 588 times
Been thanked: 578 times

Re: On-Screen Battery Monitor Options

Post by rodocop » Mon Jul 15, 2019 12:48 pm

Konek wrote:
Mon Jul 15, 2019 11:46 am
Can we move the icon location and change it size? I'm using rpi3b+ with 7" official touch screen and would like to move it to top right hand corner with smaller size icon. Default icon size is little big and off a bit to left of that corner.
Yes you can, to edit the size you actually need to modify the PNG image files on your computer to adjust the size, and then you need to adjust the script for the position.

Look in the MintyBatteryMonitor.py for this line and edit the X and Y and find what works best for you (there will be two instances of this line, edit both the same):

os.system(PNGVIEWPATH + "/pngview -b 0 -l 3000" + percent + " -x 650 -y 10 " + ICONPATH + "/battery" + percent + ".png &")

User avatar
Konek
Posts: 4
Joined: Wed Jul 03, 2019 11:14 pm
Has thanked: 1 time
Been thanked: 1 time

Re: On-Screen Battery Monitor Options

Post by Konek » Mon Jul 15, 2019 2:28 pm

ime=1563216535 user_id=1765]
Konek wrote:
Mon Jul 15, 2019 11:46 am
Can we move the icon location and change it size? I'm using rpi3b+ with 7" official touch screen and would like to move it to top right hand corner with smaller size icon. Default icon size is little big and off a bit to left of that corner.
Yes you can, to edit the size you actually need to modify the PNG image files on your computer to adjust the size, and then you need to adjust the script for the position.

Look in the MintyBatteryMonitor.py for this line and edit the X and Y and find what works best for you (there will be two instances of this line, edit both the same):

os.system(PNGVIEWPATH + "/pngview -b 0 -l 3000" + percent + " -x 650 -y 10 " + ICONPATH + "/battery" + percent + ".png &")
[/quote]

Thank you for your help :)

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests