Closed polanskiman closed 4 years ago
Hi,
First measure the voltage on your battery. No run the program and you will get the voltage on the serial monitor. If these two values are different then change the factor (float calib_factor = 5.28;) accordingly.
Hi. Thank you. Not sure exactly how to find the value of the float calib_factor. I'm either getting tired or my brain is not functioning properly.
Voltmeter says 3.983v Serial monitor say 4.847v (yes I added an additional decimal in the code - lol)
OK, quick maths: Formula in the code: volts = raw calib / 1024 1.) Find raw first: 4.847 = raw 5.28 / 1024 --> raw = 940 2.) Find calib: 3.983 = 940 * new_calib / 1024 --> your calib_factor: 4.338
Should work...
I am tired indeed!
Thank you.
Hello,
I had a question about the voltage monitoring. Code says:
Question is, how one calibrates the battery voltage?
Thank you.