Hi guys, I am trying to implement the battery monitor in the PCB design I am doing now and I would like to confirm I have understood everything. After reading all posts here these are the conclusions (might help as well to summarise or understand for others). Sorry if some things are too basic, I am not fully experienced in some topics and I like things plain and simple to understand. If anything is wrong please tell me! Here it goes:
As the Raspberry pi does not have analogue pins and if you do not want to implement an ATMEGA chip, one option to have a battery monitor on the screen is to use the ADS1015. The wiring of the Adafruit's module is as follows (from this forum by
VeteranGamer):
For your build, if you are using GPIO pins for the buttons, make sure you leave the GPIO pins 2 (SDA) and 3 (SCL) free for the ADS1015 outputs. Here is a question I have about the wiring in this point:
- What are the pins A0-A4 form the board? and why is A0 connected to the 5V input? Is this some sort of reference voltage to do the calculations on the battery level?
Next, you would need to implement these changes in the Retropie software and this is the part I am having more trouble to understand the most. I would like to implement this in a GBZ build and I understand I will need to change the configuration file and something else, right? First you will need to install the
Mintippy battery monitor and, according to
Merlin, change the values in line 47:
Code: Select all
monitor_btn = Button(19, hold_time=2)
You can change the 19 value for other GPIO button you would like to use to show up the battery level on the screen.
- Here I can see the code has changed and I cannot find the lines Merlin was talking about. Does anyone has any update on this?
- Also, will this work if safe shutdown is not present in the hardware?
For the moment that is all, hope some of you guys can answer the questions! Thanks!