BlocosIA Wiki Editor

Robot

Simulate robots: motors, color and light sensors, ultrasonic, temperature and weight (mass) on sprites.

Build the robot in the robot editor (shapes, wheels and named sensors) and use the "sensor ..." blocks. The sprite becomes a robot seen from above. "front" and "side" are in steps from the sprite's center (positive side = right). Angle 0 = front, 90 = right, -90 = left.

To use it: in the editor, click "Extensions" (bottom corner) and add "Robot".

Boolean

sensor [ ▾ ] sees [black] ?

Answers true or false. Use it in "if", "repeat until" and "wait until".

Reporter

color at sensor [ ▾ ]

Gives a number or text. Put it inside a round slot.

Reporter

reflected light at sensor [ ▾ ] (%)

Gives a number or text. Put it inside a round slot.

Reporter

[red (R)] at sensor [ ▾ ]

Gives a number or text. Put it inside a round slot.

Reporter

distance at sensor [ ▾ ]

Gives a number or text. Put it inside a round slot.

Boolean

sensor [ ▾ ] sees sprite [ ▾ ] ?

Answers true or false. Use it in "if", "repeat until" and "wait until".

Boolean

touch sensor [ ▾ ] pressed?

Answers true or false. Use it in "if", "repeat until" and "wait until".

Reporter

temperature at sensor [ ▾ ] (°C)

Gives a number or text. Put it inside a round slot.

Reporter

value of sensor [ ▾ ]

Gives a number or text. Put it inside a round slot.

Stack

motors: left ( ) % right ( ) %

Does an action. Snap it below another block.

Stack

motor [both] at speed ( ) %

Does an action. Snap it below another block.

Stack

stop the motors

Does an action. Snap it below another block.

Stack

spin in place ( ) degrees

Does an action. Snap it below another block.

Stack

robot top speed: ( ) steps per second

Does an action. Snap it below another block.

Reporter

color at sensor (front ( ) side ( ))

Gives a number or text. Put it inside a round slot.

Boolean

sensor (front ( ) side ( )) sees [black] ?

Answers true or false. Use it in "if", "repeat until" and "wait until".

Reporter

reflected light at sensor (front ( ) side ( )) (%)

Gives a number or text. Put it inside a round slot.

Reporter

[red (R)] at sensor (front ( ) side ( ))

Gives a number or text. Put it inside a round slot.

Reporter

ultrasonic distance pointing at ( ) degrees

Gives a number or text. Put it inside a round slot.

Boolean

ultrasonic pointing at ( ) degrees sees [ ▾ ] ?

Answers true or false. Use it in "if", "repeat until" and "wait until".

Stack

show sensors: [yes]

Does an action. Snap it below another block.

Stack

set my temperature to ( ) °C

Does an action. Snap it below another block.

Stack

change my temperature by ( ) °C

Does an action. Snap it below another block.

Reporter

my temperature (°C)

Gives a number or text. Put it inside a round slot.

Reporter

temperature of [ ▾ ] (°C)

Gives a number or text. Put it inside a round slot.

Reporter

temperature measured by the sensor (°C)

Gives a number or text. Put it inside a round slot.

Hat

when measured temperature > ( ) °C

Starts a script when this happens.

Hat

when I pass [ ▾ ]

Starts a script when this happens.

Reporter

last split time (s)

Gives a number or text. Put it inside a round slot.

Reporter

time since start (s)

Gives a number or text. Put it inside a round slot.

Reporter

timer now (s)

Gives a number or text. Put it inside a round slot.

Reporter

last gate

Gives a number or text. Put it inside a round slot.

Reporter

completed laps

Gives a number or text. Put it inside a round slot.

Reporter

best lap (s)

Gives a number or text. Put it inside a round slot.

Boolean

timer running?

Answers true or false. Use it in "if", "repeat until" and "wait until".

Stack

reset my times

Does an action. Snap it below another block.

Stack

be a timing gate named [A]

Does an action. Snap it below another block.

Stack

stop being a timing gate

Does an action. Snap it below another block.

Stack

set my mass to ( ) kg

Does an action. Snap it below another block.

Stack

change my mass by ( ) kg

Does an action. Snap it below another block.

Reporter

my mass (kg)

Gives a number or text. Put it inside a round slot.

Reporter

mass of [ ▾ ] (kg)

Gives a number or text. Put it inside a round slot.

Reporter

weight on top of me in [kg]

Gives a number or text. Put it inside a round slot.

Hat

when the weight on me > ( ) kg

Starts a script when this happens.