Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ' Stamps in Class - FirstProgram.bs2
- ' BASIC Stamp sends message to Debug Terminal.
- ' {$STAMP BS2}
- ' {$PBASIC 2.5}
- ctr VAR Byte
- my_flags VAR Byte
- GOTO Main
- Main:
- DEBUG "Hello, it's me, your BASIC Stamp!" , CR
- GOSUB Hi_Again
- GOSUB Jump_Sub
- FOR ctr = 1 TO 4
- GOSUB Flash_Light
- NEXT
- GOSUB Hi_Again
- FOR my_flags = 0 TO 1
- PAUSE 1000
- FOR ctr = 1 TO 200
- GOSUB Turn_Motors
- NEXT
- next
- END
- Hi_Again:
- DEBUG "hello again" , CR
- RETURN
- Jump_Sub:
- DEBUG "jumped to here" , CR
- RETURN
- Flash_Light:
- HIGH 13
- PAUSE 20
- LOW 13
- PAUSE 80
- RETURN
- Skipping_Lines:
- GOTO Line_Was_Skipped
- DEBUG "this line was supposed to be skipped",CR,CR
- Line_Was_Skipped:
- DEBUG "did we skip the line?",CR
- RETURN
- Turn_Motors:
- PULSOUT 13, 650
- IF my_flags=0 THEN Skip_12
- PULSOUT 12, 650
- Skip_12:
- PAUSE 20
- return
Advertisement
Add Comment
Please, Sign In to add comment