I have followed a tutorial to measure the voltage of a power supply by using 2 resistors of 10K and 100K to take the input voltage down so I can measure voltages up to ~55 volts
This works pretty good. The tutorial is Dutch but very simple: http://domoticx.com/arduino-de-arduino-als-dc-voltmeter/
As far as I understand the voltage is measured against its own input voltage the board receives to be powered on.
In the tutorial this is 5V and they use 4.7 because of some loss. They use the voltage as a variable to make a calculation.
I want to power the arduino with a 12V power supply through the barrel connector. As far as I know the voltage regulator of the arduino will step it down to 5V.
My question is, in the code do I need to change the variable to 12V or keep it at 5V.
I think the latter because internally it still works on 5V but I’m not sure.