Vulpes

boebot_up2

May 26th, 2011
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. ' Stamps in Class - FirstProgram.bs2
  2. ' BASIC Stamp sends message to Debug Terminal.
  3.  
  4. ' {$STAMP BS2}
  5. ' {$PBASIC 2.5}
  6. ctr VAR Byte
  7. my_flags VAR Byte
  8. GOTO Main
  9.  
  10. Main:
  11. DEBUG "Hello, it's me, your BASIC Stamp!" , CR
  12. GOSUB Hi_Again
  13. GOSUB Jump_Sub
  14.  
  15. FOR ctr = 1 TO 4
  16. GOSUB Flash_Light
  17. NEXT
  18. GOSUB Hi_Again
  19.  
  20. FOR my_flags = 0 TO 1
  21. PAUSE 1000
  22. FOR ctr = 1 TO 200
  23. GOSUB Turn_Motors
  24. NEXT
  25. next
  26.  
  27. END
  28.  
  29.  
  30. Hi_Again:
  31. DEBUG "hello again" , CR
  32. RETURN
  33.  
  34. Jump_Sub:
  35. DEBUG "jumped to here" , CR
  36. RETURN
  37.  
  38. Flash_Light:
  39. HIGH 13
  40. PAUSE 20
  41. LOW 13
  42. PAUSE 80
  43. RETURN
  44.  
  45. Skipping_Lines:
  46. GOTO Line_Was_Skipped
  47. DEBUG "this line was supposed to be skipped",CR,CR
  48. Line_Was_Skipped:
  49. DEBUG "did we skip the line?",CR
  50. RETURN
  51.  
  52.  
  53. Turn_Motors:
  54. PULSOUT 13, 650
  55. IF my_flags=0 THEN Skip_12
  56. PULSOUT 12, 650
  57. Skip_12:
  58. PAUSE 20
  59. return
Advertisement
Add Comment
Please, Sign In to add comment