Block description

This block is used to to play audio (Speak) messages from the board.

You can use the
• Sensor option to select the sensor and the port whose value is to be notified
• Text option to type custom text messages to be read out by the board

Hardware interface

A Rasberry Pi-compatible external speaker can be connected to Raspberry Pi''s audio jack as shown. Cloudio can then be mounted on the Raspberry Pi.
Hardware
(Please be sure to power the speakers externally)

App interface and usage

Type (Sensor/Text):

Here, you can select what should be notified via this block - Sensor value or Text
Speak 1

Sensor:

Sensor selection:

You can select the sensor whose value is to be notified using the Speak block.
Speak 2

Port:

Based on the sensor selected, you can either select the port to which the sensor is connected. This will vary based on the type of sensor ( on-board or external)
Speak 2

Note:
If you use an IR sensor, you would need to additionally set the mode of operation to either analog or digital.
If you use a temperature sensor, you would need to select the unit (C/F)
If you use a Sharp sensor, you would need to additionally select the Sharp sensor type.

Text:

Here, you can type the text that needs to spoken out aloud by the board.
Speak 2
Speak 5

Guidelines

The text can include a maximum of 100 characters
One sensor can be used with 1 block. Make sure that the selected sensor is in fact connected to the selected port.

Examples

  1. This code snippet checks the on-board IR sensor value and speaks out the sensor value when it crosses 300. For example: when the IR value reaches 400, the board says ‘IR sensor value is 400’.

Speak Ex 1

  1. This code snippet checks the on-board IR sensor value and speaks out the typed message when it crosses 300. The audio message in this case is ‘IR value had crossed the threshold of 300”.

Speak Ex 2

  1. This project uses a combination of Schedule block and Speak block to make the board speak the typed message 'Happy birthday' at 12:01 AM on the first Wednesday after the code is uploaded.

Speak Ex 3