Root Robot Properties

The Root robot is a turtle-like robot, which Logo talks to just as talking to a turtle.

Logo does not TRACE or STEP these properties, but you can monitor them with WHEN or WHENEVER.

BATTERY

Reports the battery level.

Description

BATTERY reports the battery level of the internal battery in as a percent value.

Example

GPROP "ROOT "BATTERY
Result: 60

BUMPERLEFT

Reports the state of the robot's left bumper sensor.

Description

The BUMPERRIGHT property reports the state of Root's left bumper sensor as either TRUE or FALSE, depending on whether a sensor is triggered or not.

Example

GPROP "ROOT "BUMPERLEFT
Result: FALSE

BUMPERRIGHT

Reports the state of the robot's right bumper sensor.

Description

The BUMPERRIGHT property reports the state of Root's right bumper sensor as either TRUE or FALSE, depending on whether a sensor is triggered or not.

Example

GPROP "ROOT "BUMPERRIGHT
Result: FALSE

CLIFF

Reports Root's cliff sensor.

Description

Root's cliff sensor reports TRUE when Root is about to fall off a table.

Example

GPROP "ROOT "CLIFF
Result: FALSE

COLORS

Reports the state of Root'S color sensor array.

Description

Root's 32 color sensors are divided into five groups of 6 sensors, with the middle group being 8 sensors. The value of this property is a five-element list of color names. The color is the color that most sensors in the group report. Possible values are BLACK, RED, GREEN, BLUE, or WHITE. The lists' first element is the left sensor group.

Example

GPROP "ROOT "COLORS
Result: [WHITE WHITE WHITE BLUE WHITE]

LIGHT

Reports the status of Root's light sensors.

Description

LIGHT reports the state of Root's two light sensors. The property values are as follows:

  • NONE - both sensors report a low light level
  • LEFT - the left sensor reports a high light level
  • RIGHT - the right sensor reports a high light level
  • BOTH - both sensor report a high light level

Example

GPROP "ROOT "LIGHT
Result: DARK

STALLED

Reports whether a motor has stalled.

Description

STALLED reports the stalled state of Root's motors. Possible values are NONE, LEFT, RIGHT, or MARKER if the pen motors has stalled.

Example

GPROP "ROOT "STALLED
Result: NONE

TOUCHFRONTLEFT

Reports the state of Root's top front left touch sensor.

Description

TOUCHFRONTLEFT reports the state of Root's top front left touch sensor as either TRUE or FALSE, depending on whether it is touched or released.

Example

GPROP "ROOT "TOUCHFRONTLEFT
Result: FALSE

TOUCHFRONTRIGHT

Reports the state of Root's top front right touch sensor.

Description

TOUCHFRONTLEFT reports the state of Root's top front right touch sensor as either TRUE or FALSE, depending on whether it is touched or released.

Example

GPROP "ROOT "TOUCHFRONTRIGHT
Result: FALSE

TOUCHREARLEFT

Reports the state of Root's top rear left touch sensor.

Description

TOUCHREARLEFT reports the state of Root's top rear left touch sensor as either TRUE or FALSE, depending on whether it is touched or released.

Example

GPROP "ROOT "TOUCHREARLEFT
Result: FALSE

TOUCHREARRIGHT

Reports the state of Root's top rearright touch sensor.

Description

TOUCHREARRIGHT reports the state of Root's top rear right touch sensor as either TRUE or FALSE, depending on whether it is touched or released.

Example

GPROP "ROOT "TOUCHREARRIGHT
Result: FALSE