28125 Parallax Inc, 28125 Datasheet - Page 58

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
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
this:
Example Program: HelloOnceEverySecond.bs2
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
DO
LOOP
Enter, save, and run HelloOnceEverySecond.bs2.
Verify that the “Hello!” message is printed once every second.
DEBUG "Hello!", CR
PAUSE 1000
PAUSE 60000
DEBUG
PAUSE Duration
and
Duration
PAUSE
DO
.
and
commands between the words
LOOP
argument is 65535. If you've got a minute to
arguments from 1000 and 2000 to 5000 and
if you want them executed over and over
Duration
DO
and
arguments;
LOOP
like

Related parts for 28125