Parallax Boe-Bot Student Manual page 58

Hide thumbs Also See for Boe-Bot:
Table of Contents

Advertisement

Page 44 · Robotics with the Boe-Bot
Try changing the
10000, for example:
DEBUG "Start timer..."
PAUSE 5000
DEBUG CR, "Five seconds elapsed..."
PAUSE 10000
DEBUG CR, "Fifteen seconds elapsed..."
Run the modified program.
Also try it again with numbers like 40 and 100 for the
they'll go pretty fast.
The longest possible
spare, try
PAUSE 60000
Over and Over Again
One of the best things about both computers and microcontrollers is that they never
complain about doing the same boring things over and over again. You can place your
commands between the words
again. For example, let's say you want to print a message repeating once every second.
Simply place your
DEBUG
this:
DO
DEBUG "Hello!", CR
PAUSE 1000
LOOP
Example Program: HelloOnceEverySecond.bs2
Enter, save, and run HelloOnceEverySecond.bs2.
Verify that the "Hello!" message is printed once every second.
arguments from 1000 and 2000 to 5000 and
PAUSE Duration
argument is 65535. If you've got a minute to
Duration
.
and
if you want them executed over and over
DO
LOOP
and
commands between the words
PAUSE
arguments;
Duration
and
like
DO
LOOP

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents

Save PDF