A quick bit of programming to see if the buggy was working once constructed:
Sensor Input Program:
main:
READADC 0,B0
READADC 1,B1
READADC 2,B2
Debug
If b0>100 then b3=1
GOTO main:
Motor Test Program:
Main:
High 0 `Run Motor 1(?) Forwards(?)
Low 1
Pause 3000 `Pause for 3000
Low 0
High 2 `Run Motor 2(?) Forwards(?)
Low 3
Pause 3000 `Pause for 3000
Low 2
Goto Main:
Initial Buggy Program Idea:
Main:
Read 0,B0 `Left Sensor written to Bo
Read 1,B1 `Sensor 2 Written to B1
Read 2,B2 `Right. Sensor written to b2
Low 5 Low 4 Low 6 Low 7
Debug `To check working correctly
If B0=1 Then high 5 Low 4
Else If B2=1 Then high 6 low 7
Endif
Goto Main
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment