Investigating playing pre-recorded sounds.Įxplain to students that in addition to playing beeps, the hub can also be programmed to play pre-set sounds such as a cat’s meow or a dog barking. Here is a sample song for students that might struggle. Allow students time to explore changing the images shown as time allows. This guide will provide a range of numbers to use in the code to make different sounds as well as some guidance on errors. Guide students to reference the sound options through the Speaker section in the Knowledge Base and select beep(). Students should add several additional lines of code with different sounds to make a song. Any new message will appear after this one.Ĭhallenge students to take what they learned in their investigation to add additional lines of code to create a song. Remind students that this error message will remain in the console.Anything outside this range will provide an error. This represents an error which can occur if the information is not inputted correctly. Ask students to explain what happened.Students will encounter an error, which can be identified by a red flashing light on the hub or an error message in the console. ![]() ![]() Note: Students may have already discovered this on their own. Explain that the number 60 represents tone (low or high pitch) and the number 1 represents the length of time it plays.Īsk students to replace the number 60 (tone) with a number lower than 44. Ask students to identify what the number 60 and the number 1 each represents in the code. Encourage students to try different numbers.Īllow students to share the new sounds they have created by changing the numbers. Review the code with students to identify what sections of the code tell the software what to do (importing the hub), what portions of the code tell the hub what to do (initialize and beep), and what portions are just notes to the programmer (# green sections).Īsk students to identify areas that they could change to play different sounds. Students can also copy and paste the sample code from the Knowledge Base Getting Started Part 1: Programming Simple Outputs. Have students type the code into the programming canvas. Provide students with the sample code below. Students should connect their hub.Īllow students to investigate how sounds can be made using the hub with this sample program. Ask students to erase any code that is already in the programming area. Investigate producing beep sounds on the hub.ĭirect students to open a new project in the Python programming canvas. Examples may include whistles or honking a horn to get someone’s attention, clapping hands to show approval, or a scream that means you are very scared of something.Ĭreating sounds is a great way to communicate. Students should create their own sounds for each brick and try to work together to build the stacks.ĭiscuss with students how sound can be used to communicate other than talking. ![]() Make each sound as you create your stack.Demonstrate the idea by saying that the green brick is represented by a clap, the red brick by a snap, and the blue brick by a stomp.Ask the teams to come up with a way to communicate with each other using sounds.However, this time students cannot show the stack to each other. ![]() Next, challenge the students to repeat the exercise with Partner B creating the stack. The simplest approach here would be to show Partner B how to build the stack.
0 Comments
Leave a Reply. |