readadc 12, b0
symbol adc_input = 12
readadc adc_input
#picaxe 28x2
let adcsetup2 = 2
Symbol Headlamp_Output = b.1
Symbol Headlamp_Error_Flag = b11
Symbol Headlamp_Threshold = 80
Symbol Headlamp_Sense = b1
Symbol Headlamp_Switch = pinA.0
Main:
Headlamps:
if Headlamp_Switch = 1 and Headlamp_Error_Flag = 0 then
High Headlamp_Output
else
low Headlamp_Output
endif
Readadc 18,Headlamp_Sense
If Headlamp_Sense > Headlamp_Threshold then
Headlamp_Error_Flag = 1
low Headlamp_Output
Endif
goto Main
Yes.Thank you i thought madness had set in.
But the manual states that adcsetup should be used to disconnect the digital buffers.
But then goes on to say that adcsetup2 is only available on the 40x2.
Can you try replacing the adc channel number with a symbol,Do you get a syntax error?
#picaxe 28X2
; version 18F25K22
; Firmware B.3
; PE version 5.3.4
symbol Sausage =19
main:
readadc 19, b1 ;passes Syntax
; readadc Sausage , b1 FAILS
sertxd (#b1,cr,lf)
pause 1000
goto main
Did Technical ever resolve this?we will look into why symbols don't work.