All Buetooth robots must be connected to Logo with the Bluetooth selection dialog available at the “Tools/Connect to Bluetooth Device” menu item or the
Pro-Bot needs a serial-to-USB connection that the Web based version of Logo cannot offer. To use Pro-Bot, you need to use the desktop version of Terrapin Logo.
Please note that robot commands are only available in the licensed version of Logo.
Tests if the Blue-Bot is connected and ready to receive commands.
TRUE if it can talk to a Blue-Bot.
For backwards compatibility, BLUEBOT.OPEN is synonymous to BLUEBOT?.
Reports Blue-Bot's battery level.
BLUEBOT.BATTERY reports Blue-Bot's battery level, which is a number between 0 and 1. It may take a few seconds before Blue-Bot actually reports the battery level; the command would report 0 in that case.
Clears all commands stored in Blue-Bot's memory.
BLUEBOT.CLEAR clears all commands stored in a Blue-Bot. This is equivalent to pressing Blue-Bot's CLEAR button, which is disabled when Blue-Bot is connected.
Disconnects the Blue-Bot from Logo.
BLUEBOT.CLOSE closes the connection to Blue-Bot. After a while, Blue-Bot turns off the blue lights, indicating that it is available for a new connection; it also turns its buttons back on.
Executes commands stored in Blue-Bot's memory.
BLUEBOT.GO executes all commands that a previous
BLUEBOT.WRITE command has stored into Blue-Bot. This is equivalent to pressing Blue-Bot's GO button, which is disabled when Blue-Bot is connected.
Executes Blue-Bot commands.
BLUEBOT.RUN procedurename BLUEBOT.RUN [list of commands]
BLUEBOT.RUN transmits a list of commands to Blue-Bot and lets Blue-Bot execute them immediately. Use the
BLUEBOT.GO commands if you want Blue-Bot to repeatedly execute a list of stored commands.
If you call BLUEBOT.RUN with a procedure name, BLUEBOT.RUN downloads the contents of the procedure to Blue-Bot. Note that the use of variables like procedure inputs is not permitted.
Blue-Bot stores a maximum of up to 200 commands. Please note that a Logo command may consume more than one Blue-Bot command. If you get an error message that your code is too complex, consider using a repeat loop, or fewer movements. A
FD 10 command, for example, would store 10 FD commands into Blue-Bot's memory.
The following table provides an overview over all available Logo commands that Blue-Bot understands.
|| Blue-Bot moves forward in fixed-size units. A value of 1 does not mean a single pixel as the screen turtle, but one Blue-Bot movement unit, which is about 6 inches (15 cm). If you, for example, use the command
|| As with the
||Blue-Bot turns left or right in 45-degree increments. Logo calculates the amount to turn in as few commands as possible. Therefore, Blue-Bot may make brief stops while turning.|
|| The same limitations that are valid for the
|| This command corresponds to Blue-Bot's
|| Blue-Bot has a simple built-in repeat feature that lets it execute a list of commands between 1 and 16 times. The
Downloads a procedure to Blue-Bot.
BLUEBOT.WRITE procedure-name BLUEBOT.WRITE [runlist]
BLUEBOT.WRITE transmits a procedure to Blue-Bot. Its input is the name of the procedure to transmit. It does not run these commands; use the
BLUEBOT.GO command to execute a stored list of commands.
Controls a robot's LEDs.
LED word-or-list color (LED word-or-list color duration)
LED controls the LEDs of a robot. Depending on the robot type, its first inputs can be a word or a list. The second input is a color name or color value.
If a third input is given, it is the duration in milliseconds that each of the LEDs should be turned on. Note that not all LEDs are turned on at the same time, but one after another, staying on for the given time. This allows for interesting light effects.
InO-Bot: InO-Bot has eight full-color LEDs. The first input is either a number from 1 to 8, or a list containing the numbers of the LEDs to set. The second input is a color name or a color value.
Root: The Root robot's LEDs are only accessible as a single LED. Therefore, the first input controls the effect: 0 is off, 1 is on, 2 blinks the LEDs, and 3 spins the LEDs.
; InO-Bot example ; set LED #1 to red LED 1 "RED ; set LEDs 2, 3, and 4 to gold for half a second each (LED [2 3 4] "GOLD 500) ; turn all LEDs off LED [1 2 3 4 5 6 7 8] "BLACK
Controls a robot's motors.
MOTORS controls the speed or a robot's motors. It input is a value or a list of values between -1 and 1. The value 0 causes the motor to stop, and the value 1 turns on the motors at full speed. Positive values causes the motor to move forward, while negative values cause the motor to move backwards.
Currently, all floor robots accept a single number that controls the speed of all motors. Use MOTORS 0 to stop the motors.
Tests if a Pro-Bot is connected and ready to receive commands.
For backwards compatibility, PROBOT.OPEN is synonymous to PROBOT?.
TRUE if a Pro-Bot is connected to your computer; if Logo cannot find a Pro-Bot, PROBOT? reports
Disconnects the Pro-Bot from Logo.
Turns the Pro-Bot's headlights on or off.
PROBOT.LIGHTS TRUE or FALSE
PROBOT.LIGHTS is a placeholder command for the Pro-Bot. On the Pro-Bot, it turns its headlights on or off. The Logo command tries to turn on the headlights by looking for a turtle named
PROBOT. If there us such a turtle, it attempts to set the turtle's shape to either
DECLARE "TURTLE "PROBOT PROBOT.LIGHTS TRUE ProBot lights are ON
Uploads all Pro-Bot procedures into Logo's workspace.
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
BOT, where the latter movement unit is about 25 centimeters.
PROBOT.READ uses the following procedure names when creating the Logo procedures.
||This is the main program.|
||The Pro-Bot can store up two 32 different procedures; these procedures must be named exactly this way.|
||The name of the procedure that the Pro-Bot runs if the front sensor is triggered.|
||The name of the procedure that the Pro-Bot runs if the rear sensor is triggered.|
||The name of the procedure that the Pro-Bot runs if the light sensor reports a brightness level of more than about 50 Lux.|
||The name of the procedure that the Pro-Bot runs if the light sensor reports a brightness level dropping below 50 Lux.|
|| 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
Note that the Pro-Bot does not check its sensors if a main program is not running. To make Pro-Bot check its sensors, have it run a procedure, or
WAIT for anything to happen.
Plays Pro-Bot sounds.
PROBOT.SOUND 1 through 7
PROBOT.SOUND plays one of the seven Pro-Bot sounds by playing one of the sound files at
Probot7.wav. It is a placeholder for the Pro-Bot's
Downloads all Pro-Bot procedures to the Pro-Bot.
PROBOT.WRITE (PROBOT.WRITE units)
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
BOT, where the latter movement unit is about 25 centimeters. As backwards compatibility, you can also use the word
PROBOT instead of
Tests if a Root robot is connected and ready to receive commands.
TRUE if Logo can talk to a Root robot.
Disconnects a Root robot.
ROOTBOT.CLOSE disconnects a Root robot from Logo and erases the screen turtle. This is a synonym for the command
Selects a Bluetooth device.
SELECT.BLUETOOTH opens the Bluetooth selection dialog and lets the user select a Bluetooth device. Its output is a two-element list. The first element is the device type, like e.g. BLUEBOT or INOBOT, and the second element is the Logo name of the device. This may be different from the first element if the user has renamed the Bluetooth device. If the user canceled the dialog, SELECT.BLUETOOTH outputs an empty list. On errors, SELECT.BLUETOOTH throws a runtime error which can be caught with the
SELECT.BLUETOOTH must be used in response to a user action, like clicking a button. Browser environments demand this functionality.
SELECT.BLUETOOTH Result: [BLUEBOT BETTY]