Pro-Bot Commands
Talk to the Pro-Bot.
Terrapin Logo 4 can upload Pro-Bot procedures, run them in Logo, and download them to the Pro-Bot. See the Programming the Pro-Bot page for details. This page also explains how to connect a Pro-Bot; you need to download and install a driver, and to buy a special USB cable before you can talk to a Pro-Bot.
PROBOT?
Also: PROBOTP
Tests if a Pro-Bot is connected.
Syntax
PROBOT?
Description
PROBOT? reports TRUE
if a Pro-Bot is connected to your PC or Mac; if
Logo cannot find a Pro-Bot, PROBOT? reports FALSE
.
Note that you must install a driver and use a special USB cable to two male type A connectors to connect a Pro-Bot.
Example
PROBOT? Result: FALSE
PROBOT.LIGHTS
Turns the Pro-Bot’s headlights on or off.
Syntax
PROBOT.LIGHTS TRUE or FALSE
Description
PROBOT.LIGHTS is a
placeholder command for the Pro-Bot. On the Pro-Bot, it turns its
headlights on or off. Within Logo, it sets the shape of all active
turtles to either ~home/Toolbox/Robots/ProbotLights.bmp
(if the input
to this command is TRUE) or Probot.bmp
.
PROBOT.READ
Uploads all Pro-Bot procedures into Logo’s workspace.
Syntax
PROBOT.READ
Description
PROBOT.READ uploads all procedures stored in the Pro-Bot into the Logo
workspace. It displays the name of every defined procedure and reports
the movement units that the Pro-Bot is configured to; this is either
CM
or PROBOT
, where the latter movement unit is about 25
centimeters.
PROBOT.READ uses the following procedure names when creating the Logo procedures.
PROBOT.MAIN |
This is the main program. |
PROC1 through PROC32 |
The Pro-Bot can store up two 32 different procedures; these procedures must be named exactly this way. |
ON.FRONT |
The name of the procedure that the Pro-Bot runs if the front sensor is triggered. |
ON.REAR |
The name of the procedure that the Pro-Bot runs if the rear sensor is triggered. |
ON.LIGHT |
The name of the procedure that the Pro-Bot runs if the light sensor reports a brightness level of more than about 50 Lux. |
ON.DARK |
The name of the procedure that the Pro-Bot runs if the light sensor reports a brightness level dropping below 50 Lux. |
ON.SOUND |
The name of the procedure that the Pro-Bot runs if the sound sensor registers a sharp sound like the clapping of hands. Note that the sound sensor is only enabled if the motors do not run; you should use the Pro-Bot’s Pause command to make it wait for a sound. |
Note that the Pro-Bot does not check its sensors if a main program is
not running. To make the Pro-Bot check its sensors, even a Ps 499
(which makes the Pro-Bot pause for 499 seconds) is sufficient.
Example
PROBOT.READ PROBOT.MAIN defined PROC1 defined PROC2 defined ON.FRONT defined Result: CM
PROBOT.SOUND
Plays Pro-Bot sounds.
Syntax
PROBOT.SOUND 1 through 7
Description
PROBOT.SOUND plays one of the seven Pro-Bot sounds by playing one of the
sound files at ~home/Sounds/Probot1.wav
to Probot7.wav
. It is a
placeholder for the Pro-Bot’s Sound
command.
Example
PROBOT.SOUND 3
PROBOT.WRITE
Downloads all Pro-Bot procedures to the Pro-Bot.
Syntax
PROBOT.WRITE
(PROBOT.WRITE units)
Description
PROBOT.WRITE downloads all Pro-Bot procedures to the Pro-Bot. Note that
the procedure names must match the names listed under the
PROBOT.READ command. Optionally, PROBOT.WRITE takes the
movement units that the Pro-Bot should be configured to; this is either
CM
or PROBOT
, where the latter movement unit is about 25
centimeters.
Example
PROBOT.WRITE