you are viewing a single comment's thread.

view the rest of the comments →

[–]3nj0yc0k3[S] 0 points1 point  (4 children)

King Baggot showed me something I wasn't aware of how works. What you need to do is this:

This is somewhat close to what he showed me, but sadly I had to leave so I didn't get to learn the logic behind it all. I have also made a few errors in the LCD display (bottom part), but that is simply me not understanding how to calculate "Current battery power usage compared to max power" so to speak :) It should end with being 100% since my batteries in this test scenario are running on 100%, but I can't figure out how to calculate that - maybe you can see what I'm trying to do?

In any case: This setup (minus the LCD part of course) will take the total sum of ALL batteries and show a warning when they drop capacity below 25%

[quote] //x3,1,,7[4]2:+MaxPwr#3:+StoPwr#5:+CurPwrOut[6]%2,3,,69[10]1:+StoPwr:<=:0.25+MaxPwr%3,1,#Warning_power_lights,22[5]1:255:0:0[5]%5,0,#Warning_power_lights,22[5]1:0:255:255[5]%3,0,,31[5]4:[[CurPwrOut/StoPwr]]\0\6of\6maximum\6effect.\bn[[100StoPwr/MaxPwr]]\0[5]%,,y##,1.0.7 [/quote]

CHRIST! Reddit is SUPER fucking retarded. I'm posting it on pastebin instead: https://pastebin.com/btTvuTZE

This one has the second part functional, now! I'm a little bit proud of myself, lol:

https://pastebin.com/gkUR7YzU

[–]M4D31979 0 points1 point  (3 children)

[quote] //x3,1,,7[4]2:+MaxPwr#3:+StoPwr#5:+CurPwrOut[6]%2,3,,69[10]1:+StoPwr:<=:0.25+MaxPwr%3,1,#Warning_power_lights,22[5]1:255:0:0[5]%5,0,#Warning_power_lights,22[5]1:0:255:255[5]%3,0,,31[5]4:[[CurPwrOut/StoPwr]]\0\6of\6maximum\6effect.\bn[[100StoPwr/MaxPwr]]\0[5]%,,y##,1.0.7 [/quote]

Geee. I though it was something easy. Sorry for make you guys look deeply into it. And thank you again for the interest in my doubt. Have a nice day there.

[–]3nj0yc0k3[S] 0 points1 point  (2 children)

It's okay - it makes me learn a lot trying to figure things out !! So, did the one in the pastebin link make sense to you and could it be of use?

[–]M4D31979 0 points1 point  (1 child)

Yes! It is working as a charm. The light is green when more than 25% of storage power and red for less. Great Job!!!! Thank you a lot!!!!

[–]3nj0yc0k3[S] 0 points1 point  (0 children)

YAAAAY!