BumperBot with sound
In this section, you’ll create the BumperBotWithSound program by modifying the BumperBot program so that the TriBot waits for you to clap before it starts moving.
To make the program wait for you to clap, you need to add a Wait Sound block before the Loop block. When you drag the new block to the left of the Loop block, the Loop block will shift to the right to make room, as shown in Figure 5-16. It takes some practice to get used to the way the IDE shifts the program around as you are dragging a block. Be sure not to move the block too fast and to pause for a second before dropping the block to make sure you have it in the right spot.
Figure 5-16. Inserting the Wait Sound block
Even after you have been doing this for a while, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access