Advertisement
wai0004

picaxe mechatronics

Oct 24th, 2013
3,008
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pic 16 0.44 KB | None | 0 0
  1. init:
  2. let dirsb = 255
  3. let pinsb = pin1
  4.  
  5. main:
  6.     if pin1 = 1 then
  7.     goto wall
  8.     else
  9.     low 1
  10.     low 2
  11.     low 3
  12.     low 4
  13.    
  14.    
  15.     low 1
  16.     high 2
  17.     low 4
  18.     high 3
  19.     endif
  20. goto main
  21.    
  22. wall:
  23. '' reset values
  24.     low 1
  25.     low 2
  26.     low 3
  27.     low 4
  28. '' go backwards for 2 secs
  29.     high 1
  30.     low 2
  31.     high 4
  32.     low 3
  33.     wait 2
  34.     '' reset
  35.     low 1
  36.     low 2
  37.     low 3
  38.     low 4
  39. '' spin for ?3? secs
  40.    
  41.     low 1
  42.     high 2
  43.     low 3
  44.     high 4
  45.     wait 3
  46. '' restart program
  47.     goto main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement