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 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.
- SELECTION OF EXPRESSION: Below are the different available expressions
In the following example, Robobo shows surprise when encountering an obstacle. Initially, it moves forward until it encounters a nearby obstacle with the central front infrared sensor. At that time, he shows a surprised expression, turns back and moves in the opposite direction for 2 seconds. Finally, it shows a laughing expression:
- FUNCTION: Use 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.
- 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 EXAMPLE:
The next program makes Robobo smile, then it says the phrase that is written in the say_ block, and finally, it returns to the normal facial expression.
We could obtain a more natural expression if we use two say_ 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: 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.
- 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.
- OPERATING 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
- FUNCTION: Plays the selected musical note during the time set in the note duration field. The speakers of the Smartphone are used to emit the note.
- 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 25 possible notes with the following basic correspondence. The block admits integers associated with each note in a range of 48 to 72
- Indicates the duration of the musical note in seconds.
- Range: Any positive number.
The following program reproduces a part of the musical scale using the numerical notation discussed above: