The action blocks of the Robobo smartphone are the following:

All of them allow Robobo to perform useful actions to show information or to communicate with users.

Set Robobo emotion to _

  • function: it shows, on the smartphone screen, the face of Robobo with the facial expression selected in the drop-down field. This block is used to show Robobo emotions, which is very useful in applications that involve human-robot interaction.
  • FIELDS:
    • SELECTION OF EXPRESSION: Below are the different available expressions
Happy Sad Angry Sleeping Normal
  • EXAMPLE:

In the following example, Robobo shows surprise when encountering an obstacle. Initially, it moves forward until it faces a nearby obstacle with the central front infrared sensor. At that time, it shows a surprised expression, turns back and moves in the opposite direction for 2 seconds. Finally, it shows a laughing expression:

Say _ and wait _

  • FUNCTION: it uses the smartphone speakers to say the phrase that appears in the text field.
    • warning: The pronunciation accent depends on the language selected in the app options. For example, if the phrase is “hello world”, the pronunciation will be correct only if the selected language is English. 
  • fields:
    • phrase:
      • The only field is a free text field that causes the Android speech synthesis system to pronounce that text using the smartphone speakers.
      • Range: it is a field that must contain text, from a single word to a phrase, and there is no maximum length. Anyway, to achieve correct diction, it is advisable not to write very long sentences in the same block, but to use several sequential blocks with pauses in between. 
    • operating mode:
      • True: Robobo waits to say the phrase to continue executing the rest of the blocks.
      • False: Robobo does not wait for the end of the block to continue with the execution of the following blocks.
  • example:

The next program makes Robobo smile, then it says the phrase that is written in the say_ and wait_ block, and finally, after finishing the phrase (operating mode = true), it returns to the normal facial expression.

We could obtain a more natural expression if we use two say_ and wait_ blocks, so we can intercalate the facial expression:

The following example, similar to the one we saw in the set emotion to _ block, now adds three voice alerts of what Robobo is doing, which helps the user to know what it is doing. At the beginning of the movement it says “I start”, when it finds an obstacle it says “stop”, and at the end, it says “end”:

Play _ Sound

  • function: it plays one of the predefined sounds of Robobo that are selected in the sound selection field. They are used to show expressiveness in the robot, useful to achieve a more realistic human-robot interaction, and also for the user to perceive in a natural way what Robobo is doing.
  • fields:
    • sound selection:
      • There are 13 predefined Robobo sounds that convey different moods of the robot: moan, purr, angry, approve, disapprove, discomfort, doubtful, laugh, likes, mumble, ouch and thinking.
  • example:

The following program allows the user to touch different parts of Robobo face, eye, mouth and chin, emitting a different sound in each case. It shows joy if you “caress” the chin, surprise if you put your finger in the mouth, and anger if you put it in the eye. This is achieved by using the tap zone sensor and both the set emotion to _ and the play _ sound blocks in an infinite loop with different conditionals.

Play note _ for _ seconds and wait _

  • function: it plays the selected musical note during the time set in the note duration fieldThe speakers of the Smartphone are used to emit the note.
  • fields:
    • MUSICAL NOTE SELECTION:
      • When clicking on the musical note selection field, a piano appears that allows us to select the note to be played.
      • Range: the English notation is used and there are 133 possible notes with the following basic correspondence. The block admits integers associated with each note. In the following scheme we show the equivalency in the range 36 to 47:
DO DO# RE RE# MI FA FA# SOL SOL# LA LA# SI
C Cs D Ds E F Fs G Gs A As B
36 37 38 39 40 41 42 43 44 45 46 47
    • NOTE DURATION:
      • Indicates the duration of the musical note in seconds.
      • Range: Any positive number.
    • operating mode:
      • True: Robobo waits for the note to sound to continue executing the rest of the blocks.
      • False: Robobo does not wait for the note to sound to continue executing the rest of the blocks.
  • example:

The following program reproduces a part of the musical scale using the numerical notation discussed above: