When I wire up a potentiometer to an ADC and 3V3_A/GND, then code up using AnalogControl, the values I read range from 0 to 0.9999. Is this normal, or should they go up to 1?
It seems normal to me, If by ânormalâ you mean do I get similar results.
I think the behavior reflects the âreal worldâ. If it is âbadâ from the viewpoint of your code you could convert sufficiently small values to zero and sufficiently large values to one in the read of the pot.
You could also look at the code to see how the ADC value is converted to float and scaled 0-1.
Yes, I can definitely handle it in code, I was just making sure I should - Obviously if I have an error somewhere I should fix that, not work around it. But if everyone else gets the same results then Iâll go with that.
My suggestion wasnât to fix it in code, but to understand if it was behaving as expected.
That was my intention too, and I think it is.
1 Like