EasyManuals Logo

Parallax Boe-Bot User Manual

Parallax Boe-Bot
360 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #57 background imageLoading...
Page #57 background image
Chapter 2: Your Boe-Bot’s Servo Motors · Page 43
Example Program: TimedMessages.bs2
There are lots of different ways to use the PAUSE command. This example program uses
PAUSE to delay between printing messages that tell you how much time has elapsed. The
program should wait one second before it sends the “One second elapsed…” message and
another two seconds before it displays the “Three seconds elapsed . . . ” message.
If you have a Board of Education Rev C, move the 3-postion switch from
position-0 to position-1.
If you have a HomeWork Board, reconnect the 9 V battery to the battery clip.
Enter the program below into the BASIC Stamp Editor.
Save the program under the name “TimedMessages.bs2”.
Run the program, then watch for the delay between messages.
' Robotics with the Boe-Bot - TimedMessages.bs2
' Show how the PAUSE command can be used to display messages at human speeds.
' {$STAMP BS2}
' {$PBASIC 2.5}
DEBUG "Start timer..."
PAUSE 1000
DEBUG CR, "One second elapsed..."
PAUSE 2000
DEBUG CR, "Three seconds elapsed..."
DEBUG CR, "Done."
END
From here onward, the three instructions that came before this program will be
phrased like this:
Enter, save, and run TimedMessages.bs2.
Your Turn – Different Pause Durations
You can change the delay between messages by changing the PAUSE commands’
Duration arguments.

Table of Contents

Other manuals for Parallax Boe-Bot

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Parallax Boe-Bot and is the answer not in the manual?

Parallax Boe-Bot Specifications

General IconGeneral
BrandParallax
ModelBoe-Bot
CategoryRobotics
LanguageEnglish