Sound Effect

X Sense HAT can make voice. You can enter text to make it speak, or make specific sound effects. Let us fire a gun as soon as a 3s countdown stops.

TIPS

Write the texts in this block, and X Sense HAT will say it. It can be used with Text block.

_images/tip13.png

A number block.

_images/tip14.png

You may want to use repeat block which can help you repeatedly execute the same statement and reduce code size.

_images/tip15.png

Mathematical Operation block can perform ” + , - , x , ÷ “.

_images/tip16.png

This block can emit some preset sound effects, such as siren sound, gun sound and so on. The range of volume is 1~100.

_images/tip17.png

You may want to simplify your program with Variable, for example, when you have multiple functions that need to read the obstacle distance, you don’t need to read the value for each function, just load the value into a variable and use it multiple times.

Click the Create variable button on the Variables category to create a variable.

_images/tip19.png _images/tip18.png

EXAMPLE

_images/example4.png