There are a lot of tutorials DC voltage measurement with Arduino, in this case I found a tutorial that I consider the best functional method to measure DC without requiring input values of resistance, only requires some resistance and a multimeter, In next tutorials we will start with solar panels and we need to measure VDC over long periods.
The code was taken from of the article Measuring DC Voltage using Arduino thanks for the great contribution.
Source: Measuring DC Voltage using Arduino
We made some modifications but added a visualization and the result was very good !!Our arduino measures the voltage in the battery and transmits via serial to Node-RED.”