Hi
I have powered the Arduino Uno with a 9V Battery pack and I wanna measure it's voltagelevel with an Arduino Sketch. How can I do that without a voltage dividier ?
I'm a Newbie, if you use Shortcuts then I'm glad if you explain them
Kind regards Alain
By dividing the battery's output voltage (say by 10k/10k divider, a factor of 2), and reading that with an analog pin.
 float batt_volt = analogRead (pin) * 10.0 / 1024 ;
I assume that there is no way without a voltage divider ? If I have 12 V, can I use a 10K/150K voltage divider (a factor of 16) ?
The Code would look like this then ?
float batt_volt = analogRead (pin) * 80.0 / 1024 ;