Because I seem to be getting odd readadc values I put together a simple circuit with a 10k pot going into input 4 and a couple of leds coming out of outputs 1 and 2 and used the simple code
The pot with a voltmeter across it covers the complete range of 4.63-0v
however the point at which the red led switchs off and the yellow led switchs on is 1.84v.
As I understand it the readadc value is proportional to the voltage, so the higher the voltage - the higher the readadc value.
I'm just puzzeled by why the readadc value appears not to be proportional to the voltage scale of the pot. Please could someone advise me.
Code:
output 1
output 2
main:
readadc 4,b0
if b0< 1 then red
if b0> 100 then yellow
pins=0
red:
high 1
low 2
goto main
yellow:
high 2
low 1
goto main
however the point at which the red led switchs off and the yellow led switchs on is 1.84v.
As I understand it the readadc value is proportional to the voltage, so the higher the voltage - the higher the readadc value.
I'm just puzzeled by why the readadc value appears not to be proportional to the voltage scale of the pot. Please could someone advise me.
Last edited: