Although the previous command was tested, it did not work. Therefore it is important that we have a command which actually works. The command below has been tested and is a lot more realistic for the buggy design in accordance to our circuit. It consists of case statements and is not too long !
main:
readadc 1, b1
readadc 2, b2
select case b1
case 60 to 255
low 2
high 1
case 0 to 59
high 2
wait 3
low 1
end select
select case b2
case 60 to 255
low 4
wait 3
high 3
case 0 to 59
high 4
low 3
end select
debug b1
debug b2
goto main
As you can see, there are onloy 2 case statements. One for one LDR and the other is for the second one. The circuitry has 3 LDR , therefore, the circuitry either needs to be modified , or the command need to be modified .
Friday, 16 April 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment