Sequence 3 - Lesson 4: Broadcast More
Learning Intention
I can use broadcast in my program to make Picoh repeat a routine.
I can use broadcast in my program to make Picoh repeat a routine.
Introduction
If we want something to happen in our program over and over again we can use the repeat command. But what if we didn’t want to repeat the part immediately but at a later point? A repeat won’t do the job. Instead we can use the broadcast command. It allows us to have sequence of instructions that we call up whenever we want them to run. Let’s use it to make Picoh perform a rhyme that has some repeated parts.
Teach children the Boom-Snap-Clap rhyme:
Boom, Snap, Clap, Boom, Boom, Snap, Clap, Snap, Boom, Snap Clap, Boom Boom, Snap, Shhh
Ask children to predict what this program will do when the Green Flag is clicked:
If we want something to happen in our program over and over again we can use the repeat command. But what if we didn’t want to repeat the part immediately but at a later point? A repeat won’t do the job. Instead we can use the broadcast command. It allows us to have sequence of instructions that we call up whenever we want them to run. Let’s use it to make Picoh perform a rhyme that has some repeated parts.
Teach children the Boom-Snap-Clap rhyme:
Boom, Snap, Clap, Boom, Boom, Snap, Clap, Snap, Boom, Snap Clap, Boom Boom, Snap, Shhh
Ask children to predict what this program will do when the Green Flag is clicked:
Did it do what they expected? Can they identify the bug in the program?
The broadcast message name, that is ‘boom’, and the ‘When I receive…’ message name, that is ‘message1’ do not match. They need to match in order for the broadcast one to trigger the ‘When I receive’ event.
The broadcast message name, that is ‘boom’, and the ‘When I receive…’ message name, that is ‘message1’ do not match. They need to match in order for the broadcast one to trigger the ‘When I receive’ event.
Activity 1
Ask each student to choose one of the words from the rhyme; ‘Boom’ ‘Snap’, ‘Clap’ or ‘Shh’. Demonstrate how to create a new broadcast message. On the Events menu, click New Message:
Ask each student to choose one of the words from the rhyme; ‘Boom’ ‘Snap’, ‘Clap’ or ‘Shh’. Demonstrate how to create a new broadcast message. On the Events menu, click New Message:
Type the word as the Message name and click OK.
Ask students to program Picoh to say and make a movement to match their word when the green flag is clicked. Show the first example again:
Ask students to program Picoh to say and make a movement to match their word when the green flag is clicked. Show the first example again:
You might want to try the whole class performing the rhyme on their robots with students manually operating their robots to say the lines.
Teacher Input 2
Show two broadcast and wait blocks to make Picoh perform the boom action twice.
Show two broadcast and wait blocks to make Picoh perform the boom action twice.
Challenge children to create movements and speech for each of the words of the rhyme and then use a sequence of broadcast commands to start each:
Extension:
Can you find a way of making Picoh perform the poem using the smallest possible number of blocks? There are a number of possible ways to do this. Children could try creating a broadcast command that triggers a commonly used sequence of words as a way of reducing the number of broadcast and wait commands?
Plenary
How did you find today’s lesson? (Thumbs up, down, middle). Show your partner today’s program. Does Picoh perform the rhyme expressively?
Can you find a way of making Picoh perform the poem using the smallest possible number of blocks? There are a number of possible ways to do this. Children could try creating a broadcast command that triggers a commonly used sequence of words as a way of reducing the number of broadcast and wait commands?
Plenary
How did you find today’s lesson? (Thumbs up, down, middle). Show your partner today’s program. Does Picoh perform the rhyme expressively?