The Robobo base actuation blocks are the following:

All of them are related to actions that can be performed by Robobo base actuators, both motors and LEDs.

Stop _ Motors

  • FuncTIOn: it stops wheel, pan or tilt motors.
  • FIELDS:
    • MOTOR SELECTION: it allows you to choose if you want to stop: all motors, wheel motors, pan or tilt motors.
  • EXAMPLE:

The following program starts a straight Robobo movement with no end time (block move wheels with speed) and then waits until the value of the central infrared sensor (read IR front-c sensor value) is greater than 100 (close object). When this happens, the stop wheels motors block stops the wheels.

Move wheels with speed R _ L _ 

  • function: it moves the Robobo wheels. This block is used to set the motor speed of the right (R) and the left (L) wheels. The movement will continue until it is stopped by stop all motors block
  • fields:
    • right wheel speed (R):
      • An integer indicating the turning speed of the right wheel motor.
      • Range: -100 to 100. Negative values move wheels backwards and positive ones move them forward. The higher the values (absolute values), the faster the rotation speed. 
      • Warning: high-speed values make Robobo move too fast, which increases the probability of damaging the base or the smartphone due to an impact.
    • left wheel speed (L):
      • An integer indicating the turning speed of the left wheel motor.
      • Range: -100 to 100. Negative values move wheels backwards and positive ones move them forward. The higher the values (absolute values), the faster the rotation speed. 
      • Warning: high-speed values make Robobo move too fast, which increases the probability of damaging the base or the smartphone due to an impact.
  • EXAMPLE:

Same example as above. The following program starts a straight Robobo movement with no end time (block move wheels with speed) and then waits until the value of the central infrared sensor (read IR front-c sensor value) is greater than 100 (close object). When this happens, the stop wheels motors block stops the wheels:

Move wheels with speed R _ L _ for _ seconds and wait _

  • FUNCTION: it moves Robobo wheels for a specific time. With this block, you can set the motor speed of the right wheel (R) and the left wheel (L) and for how long they’re applied. 
  • FIELDS:
    • right wheel speed (R):
      • An integer indicating the turning speed of the right wheel motor.
      • Range: -100 to 100. Negative values move wheels backwards and positive ones move them forward. The higher the values (absolute values), the faster the rotation speed. 
      • Warning: high-speed values make Robobo move too fast, which increases the probability of damaging the base or the smartphone due to an impact.
    • left wheel speed (L):
      • An integer indicating the turning speed of the left wheel motor.
      • Range: -100 to 100. Negative values move wheels backwards and positive ones move them forward. The higher the values (absolute values), the faster the rotation speed. 
      • Warning: high-speed values make Robobo move too fast, which increases the probability of damaging the base or the smartphone due to an impact.
    • time:
      • An integer indicating how long in seconds the speed is applied to the wheel motors. 
      • Range: any positive value.
    • OPERATION MODE: There are two possible operation modes:
      • True: blocking mode, that is, Robobo will move its wheels at the speed set in R and L fields for the time set in the time field and then the program will continue.
      • False: non-blocking mode, that is, Robobo will start the movement at the speed set in R and L fields for the time set in the time field and, immediately, the next block starts running without waiting for the movement to finish.
  • EXAMPLES:

To make Robobo move straight ahead, the same positive speed value must be set in both motors (program on the left). To move straight back, the same speed value must be used, but negative (program on the right):Other combinations of positive and negative values will provide curved movements. The two following programs do the same, that Robobo rotates on site, approximately 180º. The combination of speed and time must be adjusted to achieve the desired turn:

Move wheels _ with speed _ by _ degrees

  • FUNCTION: it moves the Robobo wheels according to the selected rotation degrees. This block allows setting the speed and degrees of rotation of the wheels (right, left or both)
  • FIELDS:
    • WHEEL SELECTION:  select right, left or both in order to move the right wheel, left wheel or both, respectively. 
    • SPEED:
      • An integer number indicating the rotating speed of the motor selected in the previous field. 
      • Range: integer values from -100 to 100. Negative values move the wheel backwards and positive ones, forward. The higher the values (absolute values), the faster the rotation speed. 
      • Warning: high-speed values make Robobo move too fast, which increases the probability of damaging the base or the smartphone due to an impact.
    • TURNING DEGREES:
      • An integer number indicating the turning degrees of the selected wheel at the set speed. 
      • Range: integer values from -inf to inf (no limit). Keep in mind that a complete turn of the wheel is 360 degrees. If the wheel turns backwards, the turning degrees decrease and can be negative.
  • EXAMPLE:

The following program moves Robobo in a straight line at speed 20 until the two wheels rotate 360 degrees (one full turn). Then, the left wheel rotates 180 degrees (one-half turn) backwards at speed 30, and finally, the right wheel rotates forward 180 degrees at speed 50. The Robobo ends up in the same position after executing the last two blocks, even if the turns are at different speeds.

Move pan to position _ with speed _ and wait _

  • FUNCTION: it moves the PAN motor of the smartphone holder. This motor allows the smartphone to rotate right and left without turning the base wheels, as represented in the following image:

  • FIELDS:
    • turning angle: 
      • Integer number that indicates the rotation angle of the PAN motor.
      • Range: from -160 to 160, with 0 being the start value (as shown in the image). Negative values rotate the PAN to the left, while positive ones turn the PAN to the right.
    • turning speed: 
      • Integer number that indicates the rotation speed of the PAN motor.
      • Range: from 0 to 100. The greater the speed for a given angle of rotation, the shorter the time it will take Robobo to put the PAN motor in that angle
    • OPERATION MODES: there are two possible operation modes:
      • true: Blocking mode. in this mode, the robot continues with the execution of this block until the established angle is reached, without going to the next block.
      • false: Non-blocking mode, that is, the movement of the PAN motor starts and the execution of the following block is immediately launched. This implies that the robot can execute the movement of another motor while the PAN movement is running.
  • EXAMPLE:

The program on the left moves the PAN motor to 120º, and when this movement is finished, it moves Robobo forward for 3 seconds. The program on the right makes the same PAN movement, but simultaneously with the forward movement.

Move tilt to position _ with speed _ and wait _

  • functionit moves the TILT motor of the smartphone holder. This motor allows the smartphone to rotate forward and backward, as shown in the following image:

  • FIELDS:
    • TURNING ANGLE:
      • Real number that indicates the rotation angle of the TILT motor.
      • Range: from 26 to 109, with 90 being the start value (as shown in the image). Values lower than 90 rotate the TILT upwards, while values greater than 90 turn the TILT downwards.
    • TURNING SPEED: 
      • Real number that indicates the rotation speed of the TILT motor.
      • Range: from 0 to 100. The greater the speed for a given angle of rotation, the shorter the time it will take Robobo to put the TILT motor in that angle. 
    • OPERATION MODES: there are two possible operation modes:
      • true: blocking mode. in this mode, the robot continues with the execution of this block until the established angle is reached, without going to the next block.
      • false: non-blocking mode, that is, the movement of the TILT motor starts and the execution of the following block is immediately launched. This implies that the robot can execute the movement of another motor while the TILT movement is running.
  • EXAMPLE:

The program on the left moves the TILT motor to 90º, and when that movement is finished, it moves the PAN to 180º. The program on the right does the same movement of TITL and PAN, but simultaneously.

Set led _ to color  _

  • FUNCTION: it turns on and off the base LED selected in the led drop-down field to the color selected in the color drop-down field.

  • FIELDS:
    • led selection
      • Range: the LEDs of the base can be switched on individually (the previous image shows the location of the LEDs and their name) or all together (all).
    • color selection: 
      • There are 8 possible colors for the LEDs: white, red, blue, cyan, magenta, yellow, green and orange. It is also possible to turn off the LEDs using this command if we choose off in the color.
  • EXAMPLE:

The next program turns on each LED of the base to a different color for one second (wait block), then turns them off and repeats this sequence 10 times.