Code:
reader:
adcin 0,Z
pause 100
IF Z>100 AND Z<130 THEN I=I+5
IF Z<100 THEN I=I-5
if i>255 then i=255
if i<5 then i=0
HPWM 2,I,10000
XY=I
gosub decoder
goto reader
reader:
adcin 0,Z
pause 100
IF Z>100 AND Z<130 THEN I=I+5
IF Z<100 THEN I=I-5
if i>255 then i=255
if i<5 then i=0
HPWM 2,I,10000
XY=I
gosub decoder
goto reader