d-rez / gbz_overlay

Gameboy Zero status icon overlay display
64 stars 20 forks source link

MAX17043 instead of ADS1015, is it possible? #5

Closed DansDesigns closed 1 year ago

DansDesigns commented 1 year ago

Thank you for this amazing project!! As in the title, is it possible to use the max17043 in place of the ADS1015? Thank you

d-rez commented 1 year ago

Thanks for the kind words, glad you like it!

I don't see why not. I glimpsed at the data sheet and it seems to be a nice specialised battery monitoring chip that also works over i2c, even if bit more pricey. I wasn't aware one existed.

It's not a drop-in replacement though and unfortunately I do not plan on purchasing it to add support at this time. The ads1015 I used is already glued onto the insides of my gbz :P I'm afraid you're on your own.

It looks good though, since it's able to directly report the battery level you could get rid of all the manual calculations and approximations that I didn't put enough work into :p

That said idk how the python support is for it and that's something you'll also need to research.

Good luck! Feel free to do a pull request if you work it out :) Might put it in a separate git branch.

bverc commented 1 year ago

I see d-rez has already closed this issue. I certainly do not want to stand on anyone's toes and this probably breaks some GitHub etiquette. However in the interest of sharing information, and solving your problem:

My fork of this project includes an ADC plugin system, modulerising the ADC functions away from the main code, allowing new ADC or battery management modules to be added easily without impacting the main code. https://github.com/bverc/retropie-status-overlay/tree/master/adc

Just thought I would share in case this is of interest. If you post an issue there, I am happy to take a look.

DansDesigns commented 1 year ago

Thank you both for your replies! I will have a look at your fork and what i can do!

d-rez commented 1 year ago

@bverc eh, I don't mind really, I have not really maintained this as I could have as this was a one-off for me. Currently my gbz is completely disassembled as I have to re-print some 3d parts, fix the button board not reacting to presses sometimes and re-image the sd card sometime. Which could be a year from now lol.

So it's good that someone like you built it out independently. That's why I used github :)

I guess both could've been merged with some pull requests but this was surely an easier way for you to develop and keep building more on top of this yourself.

Sounds like your battery monitoring solution is better and would let OP add this easier indeed.

Thanks for chiming in :)