28125 Parallax Inc, 28125 Datasheet - Page 157

TEXT ROBOTICS

28125

Manufacturer Part Number
28125
Description
TEXT ROBOTICS
Manufacturer
Parallax Inc
Datasheet

Specifications of 28125

Title
Robotics with the Boe-Bot
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Not applicable / Not applicable
Example Program – MovementsWithSubroutines.bs2
' Robotics with the Boe-Bot - MovementsWithSubroutines.bs2
' Make forward, left, right, and backward movements in reusable subroutines.
' {$STAMP BS2}
' {$PBASIC 2.5}
DEBUG "Program Running!"
counter
FREQOUT 4, 2000, 3000
GOSUB Forward
GOSUB Left
GOSUB Right
GOSUB Backward
END
Forward:
Left:
Right:
FOR counter = 1 TO 64
NEXT
PAUSE 200
RETURN
FOR counter = 1 TO 24
NEXT
PAUSE 200
RETURN
FOR counter = 1 TO 24
NEXT
PULSOUT 13, 850
PULSOUT 12, 650
PAUSE 20
PULSOUT 13, 650
PULSOUT 12, 650
PAUSE 20
PULSOUT 13, 850
PULSOUT 12, 850
PAUSE 20
Enter, save, and run MovementsWithSubroutines.bs2. Hint: you can use the Edit
menu in the BASIC Stamp Editor to copy and paste code blocks from one
program to another.
VAR
Word
' Signal program start/reset.

Related parts for 28125