OK so i am making a small variable power supply , 12v max , to use with my breadboards. as well as an LCD (16 X 2 characters) to display how much voltage i am using at the moment.
i know i can only use my A.inputs with a max of 5v and translate the reading into voltage
int temp ; float val ; temp = analogRead(5); val =(float)temp * .0049 ;
But my power supply is going to be 12v not 5v , so with some research i figured i could make a voltage divider where i have a max of 12v i will get a 5v output to use on my analog input reading, now being that this 5v will be an equivalent to the 12v how do i convert my 5v reading up to 12v?
i am assuming it is not as simple as mapping my reading AFTER the conversion i posted above..map (newTemp, 0 ,5 , 0 , 12) ?