Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #picaxe 20m2
  2. Init:
  3. Symbol Left_WheelF = B.0
  4. Symbol Left_WheelB = B.7
  5. Symbol Right_WheelF = B.1
  6. Symbol Right_WheelB = B.6
  7. Symbol Left_Sensor = pinC.0
  8. Symbol Right_Sensor = pinC.1
  9. main:
  10. b1 = Left_Sensor * 10
  11. b2 = Right_Sensor * 10
  12. if b1 < 5 then
  13. high Left_WheelF
  14. low Left_WheelB
  15. else
  16. low Left_WheelF
  17. high Left_WheelB
  18. endif
  19. if b2 < 5 then
  20. high Right_WheelF
  21. low Right_WheelB
  22. else
  23. low Right_WheelF
  24. high Right_WheelB
  25. endif
  26. pause 400
  27. goto main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement