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: stops the motor selected in the drop-down field. 
  • FIELDS:
    • MOTOR SELECTION: it allows to select between four options:
      • all: it stops all the running motors.
      • wheels: is stops the two wheel motors.
      • pan: it stops the PAN motor.
      • tilt: it stops the TILT motor.
  • EXAmplE:

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

Move wheels at speed R _ L _ for _

  • FuncTIOn: it moves the Robobo wheels. This block is used to set the motor speed of the right (R) and the left (L) wheels, and the duration of the movement.
  • FIELDS:
    • RIGHT WHEEL SPEED (R): 
      • Real number that indicates the speed of rotation of the right wheel motor.
      • Range: -100 to 100. Negative values move the wheel backwards. The values of greater magnitude (absolute value), will give greater speed of rotation.
      • Warning: high speed values make Robobo move very fast, which increases the probability of damaging the base or the smartphone due to an impact.
    • left WHEEL SPEED (L): 
      • Real number that indicates the speed of rotation of the left wheel motor.
      • Range: -100 to 100. Negative values move the wheel backwards. The values of greater magnitude (absolute value), will give greater speed of rotation.
      • Warning: high speed values make Robobo move very fast, which increases the probability of damaging the base or the smartphone due to an impact.
    • TIME:
      • Real number that indicates the time in seconds during which the speed is applied to the wheel motors. This value only has an effect if the operating mode is seconds (blocking).
      • Range: any positive value.
    • OPERATION MODE: there are two possible operation modes:
      • Seconds: blocking mode, that is, Robobo will move the wheels with the speed indicated in the R and L fields during the time set in the time field, and then it will stop both engines.
      • Non-stop: non-blocking mode, that is, Robobo will initiate the movement with the speed of the wheels indicated in the R and L fields indefinitely. Therefore, in this mode, the value of the time field is not taken into account. The non-stop mode implies that the wheels must be stopped using the stop motors block.
  • 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 give rise to 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:

The previous examples use the blocking mode, and they cause Robobo to perform a predefined movement during a fixed time. The blocking mode can not be used in those cases where the movement depends on the values of the sensors, because duration is unknown beforehand. For example, the following program starts a straight movement of Robobo with no end time (non-stop) and continues with the same movement until the value of the central infrared sensor (IR value at front-C sensor) is greater than 200 (close object). When this happens, the stop wheels motors stops the wheel motors.

Move pan to _ at speed _

  • FuncTION: moves the PAN motor of the smartphone holder. This motor allows the smartphone to rotate right and left without turning the base wheels, as shown 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:
      • Blocking: in this mode, the robot continues with the execution of this block until the established angle is reached, without going to the next block.
      • Non-blocking: 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 _ at speed _

  • Función: 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:
      • Blocking: in this mode, the robot continues with the execution of this block until the established angle is reached, without going to the next block.
      • Non-blocking: 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 _ color to _

  • 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: