Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
loop:
readadc 0,w1 ‘ read value on ADC0 into w1 - 10-bit ..
if w1>255 and w1<512 then led1
if w1>512 and w1<768 then led2
if w1>768 and w1<1023 then led3
if w1>1023 then led4
low 1
low 2
low 3
low 4
pause 200 ‘ short delay
goto loop ‘ loop back to start
led1:
high 1
low 2
low 3
low 4
pause 200
goto loop
led2:
high 1
high 2
low 3
low 4
pause 200
goto loop
led3:
high 1
high 2
high 3
low 4
pause 200
goto loop
led4:
high 1
high 2
high 3
high 4
pause 200
goto loop
end