Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #picaxe 20m2
- Init:
- Symbol Left_WheelF = B.0
- Symbol Left_WheelB = B.7
- Symbol Right_WheelF = B.1
- Symbol Right_WheelB = B.6
- Symbol Left_Sensor = pinC.0
- Symbol Right_Sensor = pinC.1
- main:
- b1 = Left_Sensor * 10
- b2 = Right_Sensor * 10
- if b1 < 5 then
- high Left_WheelF
- low Left_WheelB
- else
- low Left_WheelF
- high Left_WheelB
- endif
- if b2 < 5 then
- high Right_WheelF
- low Right_WheelB
- else
- low Right_WheelF
- high Right_WheelB
- endif
- pause 400
- goto main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement