Can someone tell me whats wrong with this code, as from my understanding it should work.
I have not used a 28x2 very much and perhaps i have missed something
All it returns is a value in W1 of 10230, that dont change with varing the voltage to the ADC pin.
Code:
#picaxe 28x2
symbol Adc_reading = w1
symbol voltage = w2
symbol calibrate = 123
symbol adc_pin = 0
adcsetup = %0000000000000001
main:
readadc10 adc_pin, Adc_reading
Adc_reading = Adc_reading * 10
voltage = Adc_reading / calibrate
debug
pause 500
goto main
All it returns is a value in W1 of 10230, that dont change with varing the voltage to the ADC pin.