Thank you Runaway Pancake.
Then this is what I want (adding half a bit, to avoid rounding down)
float voltage = ((float) rawADC + 0.5 ) / 1024.0 * 5.0;
The voltage would never be 0.0 and never be 5.0
Thank you Runaway Pancake.
Then this is what I want (adding half a bit, to avoid rounding down)
float voltage = ((float) rawADC + 0.5 ) / 1024.0 * 5.0;
The voltage would never be 0.0 and never be 5.0