Fuel Gauge Monitor PLUS OLED Display?

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
CYMotorsport
 
Posts: 121
Joined: Wed Nov 24, 2021 6:17 pm

Re: Fuel Gauge Monitor PLUS OLED Display?

Post by CYMotorsport »

you're a genius! can confirm - splash screen displayed. ram was indeed the issue and M4 was up for the task.

is it a matter now of simply editing the parameters manually from the example? I tried using your code from a few years ago but it still showed the sample despite successful upload.

User avatar
dastels
 
Posts: 15608
Joined: Tue Oct 20, 2015 3:22 pm

Re: Fuel Gauge Monitor PLUS OLED Display?

Post by dastels »

It should be straightforward now that things are working.
still showed the sample despite successful upload.
What do you mean by that?

Dave

User avatar
CYMotorsport
 
Posts: 121
Joined: Wed Nov 24, 2021 6:17 pm

Re: Fuel Gauge Monitor PLUS OLED Display?

Post by CYMotorsport »

It's not straight forward if you're not experienced with this code that's what was behind my question to begin with but that aside, can you confirm this code you sent someone else for this exact same issue (displaying voltage) is meant to show the lipo%?

viewtopic.php?p=895364&hilit=fuel+gauge+display#p895364

as for the sample comment, what I meant was I input the code from the above link to experiment and try to find a solution as I'm not familiar with this code. and when I did, the same data from the example sample code given on the 128x64 OLED guide remained. nothing had changed was what I was saying even though this new code from your previous answer verified and successfully uploaded as per the IDE. Does that make sense? Sorry if i'm being confusing.

User avatar
dastels
 
Posts: 15608
Joined: Tue Oct 20, 2015 3:22 pm

Re: Fuel Gauge Monitor PLUS OLED Display?

Post by dastels »

Yes, that code should work, IFF you have that exact display. Otherwise the code will likely need to be adjusted to reflect the display. Each of Adafruit's display boards has a tutorial guide that covers how to use it. They are linked from the product's page in the shop or you can search https://learn.adafruit.com/.

Dave

User avatar
CYMotorsport
 
Posts: 121
Joined: Wed Nov 24, 2021 6:17 pm

Re: Fuel Gauge Monitor PLUS OLED Display?

Post by CYMotorsport »

Yep - exact same setup. Since you're confirming that code works as is, there's nothing left to be done other than me trouble shoot on my own why it didn't reflect on my end - which I'm sure I can resolve after some digging. thanks for your help as per usual!

nick

User avatar
CYMotorsport
 
Posts: 121
Joined: Wed Nov 24, 2021 6:17 pm

Re: Fuel Gauge Monitor PLUS OLED Display?

Post by CYMotorsport »

Had a 3am Eureka moment & got it all working. Your code was perfectly valid and showed the correct information no problem. Thanks again for providing that sample to that customer all those years back haha still effective today. someone should bookmark this code as I've seen a few people ask this question and despite it being simple for most, it's literally ready to rock out the box as you have it here.

Cheers,
Nick

User avatar
dastels
 
Posts: 15608
Joined: Tue Oct 20, 2015 3:22 pm

Re: Fuel Gauge Monitor PLUS OLED Display?

Post by dastels »

CYMotorsport wrote: Sun Sep 18, 2022 2:59 am Had a 3am Eureka moment & got it all working
Those are the best :)

Dave

User avatar
CYMotorsport
 
Posts: 121
Joined: Wed Nov 24, 2021 6:17 pm

Re: Fuel Gauge Monitor PLUS OLED Display?

Post by CYMotorsport »

and lastly the silliest question I've asked - but each time I remove the USB from the M4, I'm having to re-run the program to display the lipo % as opposed to having it display once I plug in the USB straight away. This is normal, correct?

User avatar
dastels
 
Posts: 15608
Joined: Tue Oct 20, 2015 3:22 pm

Re: Fuel Gauge Monitor PLUS OLED Display?

Post by dastels »

You have a LiPo connected and it's running nicely? Removing and/or reconnecting USB shouldn't have any effect. Unless you're using Serial in your code. Since that's dependant on the USB connection, removing it could potentially derail the program.

Try commenting out any and all use/mention of Serial and see how it behaves.

Dave

User avatar
CYMotorsport
 
Posts: 121
Joined: Wed Nov 24, 2021 6:17 pm

Re: Fuel Gauge Monitor PLUS OLED Display?

Post by CYMotorsport »

& to be clear just in case I don't take you too literally if you don't mean it: you mean to remove the actual lines from your original code - each one that contains a "serial" reference?

For instance, the attached if I remove I imagine will not be what your solution is meant to achieve. May seem like I'm being difficult but it's more out of my lack of skill in this area I can assure you.
Attachments
serial removal 1.png
serial removal 1.png (42.57 KiB) Viewed 500 times

User avatar
dastels
 
Posts: 15608
Joined: Tue Oct 20, 2015 3:22 pm

Re: Fuel Gauge Monitor PLUS OLED Display?

Post by dastels »

Yes, try removing (commenting is fine) all references/uses of Serial so that Serial isn't being used.

Dave

User avatar
CYMotorsport
 
Posts: 121
Joined: Wed Nov 24, 2021 6:17 pm

Re: Fuel Gauge Monitor PLUS OLED Display?

Post by CYMotorsport »

got it. that wasn't the problem. I was trying on dead lipos. ironically, hadn't occurred to me it wasn't working while trying to check lipo% powered by a lipo with 0% haha so to confirm, all good. no serial problem. just a brain malfunction on my end

User avatar
dastels
 
Posts: 15608
Joined: Tue Oct 20, 2015 3:22 pm

Re: Fuel Gauge Monitor PLUS OLED Display?

Post by dastels »

All good, then!

Dave

User avatar
CYMotorsport
 
Posts: 121
Joined: Wed Nov 24, 2021 6:17 pm

Re: Fuel Gauge Monitor PLUS OLED Display?

Post by CYMotorsport »

Reading the specs, I see that I'm able to plug 2 lipo: 1 to be measured and 1 to charge. Is there any way to toggle back and forth between which is charging and which port is being measured?

User avatar
dastels
 
Posts: 15608
Joined: Tue Oct 20, 2015 3:22 pm

Re: Fuel Gauge Monitor PLUS OLED Display?

Post by dastels »

What specs are you referring to?

Dave

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”