 View the battery percentage on an LCD screen :(

Hello ,

For a personal project I am looking to display on a LCD screen connected in I2C (20,2) the percentage of my lithium ion battery. I think I have to use the voltage of my battery, but I really do not see how to do it if you could help me would be super nice ^^

ps: Sorry for my bad english Yatcha:
Hello ,

For a personal project I am looking to display on a LCD screen connected in I2C (20,2) the percentage of my lithium ion battery. I think I have to use the voltage of my battery, but I really do not see how to do it if you could help me would be super nice ^^

ps: Sorry for my bad english For the moment, forget the computer.

How would you go about determining the battery percentage right now? Write it in English in your response. That will give you a starting point to see how to do it.

Paul

I was thinking of determining the percentage of battery with a voltage divider bridge, I had calculate a resistance R1 of 27k Ohm and a resistor R2 of 10k Ohm then I wanted to make a cross product to calculate the percentage with the voltage determine at the output of my voltage divider bridge.

But I'm not sure how to do it. If it were me, I would start with the examples that are likely included with your I2C LCD library.
Print Hello World to the LCD.
Then change it to print some numbers to the LCD.
Then run an analog read tutorial like this one.
Then combine the two to display the results of the analog read to your LCD.
Then put in your voltage divider and read the value from that and print it to the LCD.
Then do the math to turn that in to battery voltage.

But that’s just me.

Yatcha:
I was thinking of determining the percentage of battery with a voltage divider bridge, I had calculate a resistance R1 of 27k Ohm and a resistor R2 of 10k Ohm then I wanted to make a cross product to calculate the percentage with the voltage determine at the output of my voltage divider bridge.

But I'm not sure how to do it. Thank you for your answer I try it all tomorrow when I received my new LCD. 