Saturday 24 April 2010

Initial Programming

main:
readadc 1, b1
readadc 2, b2
select case b1
case 50 to 100
low 2
high 1
case 0 to 49
high 2
low 1
end select
select case b2
case 50 to 100
low 4
high 3
case 0 to 49
high 4
low 3
end select
debug b1
debug b2
goto main
This program would probably move the buggy to move on the magnetic strip. The idea behind this program is that one motor would switch off itself when the buggy goes off the magnetic strip.

No comments:

Post a Comment