main:
readadc 1,b1
readadc 2,b2
select case b2
case 0 to 100
high 3
case 100 to 180
low 3
endselect
select case b1
case 0 to 100
high 4
case 100 to 180
low 4
endselect
goto main
This program can be used in a way to make the buggy move on a black strip of line. The basic idea of this program is that one of the motors would be turned off when one of the sensors is on the white background. Allowing the buggy to turn .
Tuesday, 27 April 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment