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.
Fuel Gauge Monitor PLUS OLED Display?
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- CYMotorsport
- Posts: 121
- Joined: Wed Nov 24, 2021 6:17 pm
- dastels
- Posts: 15608
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Fuel Gauge Monitor PLUS OLED Display?
It should be straightforward now that things are working.
Dave
What do you mean by that?still showed the sample despite successful upload.
Dave
- CYMotorsport
- Posts: 121
- Joined: Wed Nov 24, 2021 6:17 pm
Re: Fuel Gauge Monitor PLUS OLED Display?
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.
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.
- dastels
- Posts: 15608
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Fuel Gauge Monitor PLUS OLED Display?
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
Dave
- CYMotorsport
- Posts: 121
- Joined: Wed Nov 24, 2021 6:17 pm
Re: Fuel Gauge Monitor PLUS OLED Display?
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
nick
- CYMotorsport
- Posts: 121
- Joined: Wed Nov 24, 2021 6:17 pm
Re: Fuel Gauge Monitor PLUS OLED Display?
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
Cheers,
Nick
- dastels
- Posts: 15608
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Fuel Gauge Monitor PLUS OLED Display?
Those are the best :)
Dave
- CYMotorsport
- Posts: 121
- Joined: Wed Nov 24, 2021 6:17 pm
Re: Fuel Gauge Monitor PLUS OLED Display?
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?
- dastels
- Posts: 15608
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Fuel Gauge Monitor PLUS OLED Display?
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
Try commenting out any and all use/mention of Serial and see how it behaves.
Dave
- CYMotorsport
- Posts: 121
- Joined: Wed Nov 24, 2021 6:17 pm
Re: Fuel Gauge Monitor PLUS OLED Display?
& 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.
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 (42.57 KiB) Viewed 500 times
- dastels
- Posts: 15608
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Fuel Gauge Monitor PLUS OLED Display?
Yes, try removing (commenting is fine) all references/uses of Serial so that Serial isn't being used.
Dave
Dave
- CYMotorsport
- Posts: 121
- Joined: Wed Nov 24, 2021 6:17 pm
Re: Fuel Gauge Monitor PLUS OLED Display?
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
- dastels
- Posts: 15608
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Fuel Gauge Monitor PLUS OLED Display?
All good, then!
Dave
Dave
- CYMotorsport
- Posts: 121
- Joined: Wed Nov 24, 2021 6:17 pm
Re: Fuel Gauge Monitor PLUS OLED Display?
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?
- dastels
- Posts: 15608
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Fuel Gauge Monitor PLUS OLED Display?
What specs are you referring to?
Dave
Dave
Please be positive and constructive with your questions and comments.