Advertisement
masaakiNakamura

IchigoCar 1 sensor

Jul 28th, 2016
3,187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 10 'Ichigo Car Tracer 1 sensor
  2. 20 Poke #700, #0,#88,#8a,#89,#8b,#98,#9a,#99,#9b,#28,#2a,#29,#2b
  3. 30 I=100
  4. 40 I=I-1: IF I<0 GOTO 100
  5. 50 IF IN(4)=1 GOTO 30
  6. 60 GOTO 40
  7. 100 ' Trace start
  8. 130 IF IN(4)=0 GOTO 170
  9. 140 GOSUB 800
  10. 150 I=I-1: IF i<0 GOTO 200
  11. 160 GOTO 130
  12. 170 GOSUB 900
  13. 180 I=100:GOTO 130
  14. 200 ' STOP
  15. 210 GOSUB 1000
  16. 220 GOTO 30
  17. 800 R=I2CW(#63,#700,1,#70b,1)
  18. 810 R=I2CW(#61,#700,1,#701,1)
  19. 820 R=I2CW(#60,#700,1,#707,1)
  20. 830 RETURN
  21. 900 R=I2CW(#60,#700,1,#701,1)
  22. 910 R=I2CW(#61,#700,1,#703,1)
  23. 920 RETURN
  24. 1000 R=I2CW(#61,#700,1,#701,1)
  25. 1010 R=I2CW(#60,#700,1,#701,1)
  26. 1020 R=I2CW(#63,#700,1,#701,1)
  27. 1030 RETURN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement