main:
readadc 1, b1
readadc 2, b2
select case b1
case 78 to 255 ; LDR doesn't detect light
low 1
high 2
case 0 to 77 ; LDR detects light
high 1
low 2
end select
select case b2
case 60 to 255 ; LDR does not detect any light
low 3
high 4
case 0 to 59 ; LDR does detect light
high 3
low 4
end select
debug b1
debug b2
goto main
Monday, 19 April 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment