PIPER MAKE

EDUCATOR GUIDES


YOU ARE HERE

Base expedition

Mission 13 of 13

Base expedition: Mission 13 of 14

Speech Command


Advanced

1 hour

Grades 3 - 8

MISSION OBJECTIVE

Learn the basic principles of AI and build a program that responds to voice commands. Additionally, students will use the Pico to build a circuit that illuminates LEDs based on AI interaction.

Piperbot and Pip have recovered tools from their previous adventure in Speak Like a Machine. Now they are back at their ship, and Piperbot realizes that they can use the tools to repair the fabricator and get PAL, the ship's AI assistant, back up and running to make the final parts required to begin their exploration of Mars.

View student interface at make.playpiper.com
MISSION CHARACTERS

Piperbot

Pip

PAL
MISSION MATERIALS

Computer with USB port and Chrome or Edge browser
Piper Make Base Station or Starter Kit

MISSION RESOURCES

Learning Goals

  1. Students will have a foundational understanding of Artificial Intelligence.
  2. Students will understand the basics of an AI model.
  3. Students will understand how the computer uses sensors to mimic senses.
  4. Students will understand the concepts behind the ai4k12.org in the following sections of Big Idea 1 – Perception
    1. 1 – A - i Living Things
    2. 1 – A – ii Computer Sensors
    3. 1 – B- i Sensing vs Perception
I WILL BE ABLE TO...
  • Compare how humans use our senses, and AI uses sensors to gather information
  • Understand how intelligent agents turn that data into smart decisions
  • Code an AI algorithm to recognize certain words

Learning Activities


The following sections will contain step by step instructions for ELA and ELD extensions directly related to this Mission. Adjust the directions to fit your ELA and ELD standards.

Grades 3-5
Learning Objective: Illustrate how computer sensing differs from human sensing.

ELA Extension: Piperbot, How Do You see? Write a short story about Piperbot and Pip discussing how each senses the world around them. What senses does Pip, a mouse have? What senses does Piperbot, a robot have? How are they the same? How are they different? Students can choose 1 or more senses to write about from the table below.

Sense Pip (Mouse) Piperbot (Robot)
Seeing Eyes Camera, Color Sensor
Hearing Ears Microphone
Tasting Tongue -
Smelling Nose -
Feeling Skin, muscles Buttons
Sensing Distance none Ultrasonic sensor

ELA Extension: I, Robot, Spy Alternatively, students can roleplay “I Spy” in pairs where 1 student is Pip and 1 student is Piperbot.

Students should start the conversation with sentence stems similar to those below: I’m a mouse and I can see something blue (object in room) with my eyes (sensor or sense organ). Do you see it?

The second student looks for the object and responds.
I’m a robot and I found something blue (object in room) with my camera (sensor or sense organ)!

Students can repeat the process with other senses, such as hearing something in the room.

Adaptation for ELD activities: Pair an EL student with a higher level EL student or a non-EL student.

ELD Adaptation: Robot Vocabulary Quiz Game Use the completed build and program for Speech Command for this activity. Update the word “go” to “yes” and the word “stop” to “no” in the code.

Pair students up to quiz each other. Have 1 student read the parts of the Piper Make Kit from the table below. The second student points to the named part. The 1st student will say clearly “Yes” or “No” to indicate if the answer was correct or incorrect. The Green LED should flash on for correct answers and the Red LED for incorrect answers.

PIPER MAKE AND COMPUTER PARTS

  1. Red LED (light emitting diode)
  2. Green LED (light emitting diode)
  3. Breadboard
  4. Resistor
  5. Pico
  6. Jumper Wire
  7. USB cord
  8. Built-in LED
  9. Microphone
  10. Camera


Grades 6-8
Learning Objective: Give examples of how intelligent agents combine information from multiple sensors.

ELA Extension: Sensor Presentation Choose from one of the following technologies and research what sensors it uses. Create a short slide presentation to highlight at least 5 types of sensors used. How do the sensors work together to perceive the robot’s environment? Describe the challenges and benefits of using sensors in this technology.

  1. Self-driving car
  2. Delivery drone
  3. Domino's delivery robot
  4. Roomba vacuum
  5. Firefighting robot
  6. Water rescue robot
  7. Pip and Piperbot’s Space shuttle
  8. DaVinci surgical robot
  9. Automower

ELD Adaptation: Self-driving Car or Robot Vacuum Presentation Have students create a slideshow presentation for either the Self-driving car or Robot Vacuum.

Give students the list of of sensors below and have them find pictures of each to put in their presentation. As language skills allow, students should add a short description of each sensor.

SELF-DRIVING CAR SENSORS AND PURPOSE

  • Radar - monitor other vehicles’ positions
  • Video camera - see traffic signals, signs, vehicles, people
  • Lidar - detect light to measure distances and road edges
  • GPS - sense position on Earth
  • Accelerometer - sense speed and acceleration

ROBOT VACUUM

  • Infrared - motion detection
  • Photocell - light sensor
  • Cliff sensor - detects if robot is at an edge where it will fall
  • Accelerometer - sense speed and acceleration

Career Connections

Software Developer: Salary $127,260/yr
Electrical Engineer: Salary $127,260/yr
Data Scientist: Salary $103,500/yr

Hardware Diagram




Code Diagram




Tutorial Steps

Speech Command

Piperbot, I have eyes to see and ears to hear. How do you see and hear?
Robots like me use lots of different sensors. To see, we use cameras, and to hear, we use a microphone. And there are other sensors we can use to learn about our environment, too.
A robot can use sensors that mimic every sense a person or a space mouse has! We robots even have sensors that you don't have.
Wow! Can you tell me about something you can do that I can't?
Well, I can use an ultrasonic sensor to measure how far away something is.
Is that like what a bat does to find bugs when it's flying?
Exactly!
Imagine you have a robot friend who can sense like a human, but all they can do is repeat to you what they sensed. That friend wouldn't be much fun.

An example of this is a digital camera - all it can do it show you the pictures that it took.

Now, if your robot friend can use its knowledge to get information from what it sensed, then it has the ability to perceive. With perception, your robot friend can learn, think, and make decisions almost like a human. This friend doesn't become tired, can play games, and can even help you do things.

A robot or computer that uses perception shows Artificial Intelligence, or AI for short.
AI is like giving a computer or robot a brain that helps it to understand and react to what's happening around it.
That's right! AI can learn just like you do - through information from books, the internet, pictures, sounds, or people talking to it.
Have you ever had a toy or game that responds when you talk to it? It's using AI to understand and answer or follow your command.

AI is everywhere - in video games, phones, and cars that can drive themselves! It's like magic, but science and technology are making it happen.
Which of these is AI?
A Car
A Calculator
A Computer
A Voice assistant

Voice assistants are examples of AI because they can use speech recognition to understand and respond like humans do.
Click NEXT.

Have you ever taught a pet to understand "sit" or "stay?" Your pet remembers being trained, which helps it recall word meanings. In AI, these memories are called a model, which is how it knows the difference between one word and another.
So, you're saying we can teach computers to understand and help us in our daily lives? That's so cool!
Yes! My ship even has an AI assistant named PAL, and PAL helps me run and manage my ship as I explore Mars.
But, PAL hasn't been working well lately.
Can we fix PAL?
Let's help PiperBot get his AI back up and running!
Sure! PAL has a model called "18 words". It's a list of 18 different words that PAL was trained to recognize. All we need to program PAL to do something when it hears those words.
The "18 words" model is a set of training memories an AI uses to understand the 18 unique words it learned.

When we say one of the words it knows, the AI can respond, just like your pet might go get the ball when you say "fetch!"


Click NEXT.

Once we get PAL back up and running, it can help us run our fabricator! Maybe PAL can help us fabricate some parts for the ship or sensors for exploring Mars!
OK! What should we do first?
Let's create some code that loads up a sensor and an AI model for PAL.
In this activity, we'll use a new Sensor—the microphone on your computer—to recognize your voice.

First, add the start block from the Chip menu to your workspace. Then, in the Sensing menu, find the setup microphone block and connect it:
Are the 18 words all command words?
Yes! In fact, now that we have setup the microphone and AI model, we can see what the model is detecting!
Click on the microphone in the top-right corner of your screen.

If you don't see a red microphone icon, try refreshing this page and then coming back to this tutorial.
Woah! If I say one of the words, the bar for that word goes way up!

But wait! How does the microphone know what I say?
Our AI friend, PAL, is using a model that has been trained to understand 18 different words. You saw the list when you clicked the microphone icon.

The reason you understand a new person speaking to you who says the word "three" is because your brain hears the sounds and perceives what it thinks the word is even though your brain has never listened to the sounds for the word "three" exactly the same way the new person says them.

Your brain automatically applied a probability to think that what it heard is probably the word "three" because of how many other people it has heard say "three." If the person didn't say "three," they'll correct you and your brain will learn something new.
Our brains sure are neat!
With our AI model, it has heard these 18 words spoken by a lot of people. But, if we tell our AI model that it has to be 100% sure of a word, then it can only be certain if it sounds exactly like one it has already heard. That's OK, but we need it to be better! So, just like our brain, we tell the AI that if it is 90% confident in a word, that is good enough.
Wow! This is cool stuff!
Click NEXT.

Let's gather the materials that we need to connect PAL to the fabricator!
First, we must gather the parts to set up our LEDs. This is very similar to what we did in the Blink and Traffic Lights missions.
We need to build a simple circuit with two LEDs to show whether our fabricator is on or off.
Build the circuit below:
Ah, I see! We're building this component to react to input from the microphone.
Click NEXT.

First, add a repeat forever loop to the end of your code:
Now, we're ready to add the code that will use the microphone to listen for commands, and if it hears the correct command, blink the LED.

First, add a read microphone block from the Sensing menu:
We need a variable to store what the AI hears. Click on the Variables menu and then click the Create variable button. Name your variable "myword."
Grab the necessary blocks from the Variables and Sensing menus and place them in the repeat forever loop.

Be sure the confidence on the microphone command block is set to 90%. This stores whatever command the AI model hears into the variable:
Click NEXT.

We're almost there! There's just a little more code to complete, and PAL should be ready.
Okay, the microphone hears, the AI listens and understands, and the words are stored in a variable.

I think I'm getting this.
Yup! Let's make our program do something when it hears a command.
Let's print the command stored in the my word block to the CONSOLE tab.

Grab the print block from the Chip menu and add it to your program. Then, add the my word block into the print block:
Next, add an if do block from our Logic menu.

We want the if do block to compare the my word block to a specific word. Remember the 18 words in our model? We will use the word "go" as our keyword:
Click NEXT.

We're almost there. After a few more steps, we can test our code!
That's right! We want our AI friend PAL to turn on the fabricator when he hears the "go" command. That will also turn on the LED so we know it's running.
Grab a turn pin block from the Chip menu and set it to turn on GP15
since that's where our LED is connected.

Since we want the Green LED to blink, use a wait block and another turn pin block. Finish building your code as shown below:
Click NEXT.

We're so close! We just need to add the code to control the red LED. This will be really simple.
We'll start by adding another if do block. Because we use this command to stop the fabricator, we'll check the my word block and see if it equals "stop."

Next, we'll add a turn pin block from the Chip menu to turn GP14 on so that the red LED turns on to tell us that the fabricator has stopped.

As with our previous if do block, we'll also add a wait block and set it to one second, then add another turn pin block and set GP14 to off.

Now we have the complete code block to control our fabricator!
Click NEXT.

OK! Here comes our moment of truth. Let's give it a try!
To connect your Pico, click CONNECT.

Remember to click on the CONSOLE tab to see the messages coming in from the AI and to see the fabricator!

Finally, click START to begin the program.
Look at that! When I say "go" the green light turns on and the fabricator starts making new parts!!
Once you have finished, click STOP. Then, click NEXT.

Alright! PAL is back up and running! Now, we can easily build new parts for our ship. This will make exploring Mars much easier!
YAY!!! Let's get moving!
Congratulations!

PAL is pretty smart. What happens if you start the fabricator and then suggest a particular number from the list of commands?
Click on the red microphone icon to see how the AI model is trying to match what it hears to one of its known 18 words.
Click EXIT to return to the menu and start your next coding challenge.

Blueprint

OPEN IN BLUEPRINT VIEWER  DOWNLOAD

Have an different version? Look for more information on the Support Page.

Troubleshooting Tips


If the microphone isn't working, here are a few suggestions to help!
  • Refresh the page and try again to see if the microphone loads.
  • Ensure the correct microphone is selected in your settings if more than one microphone is being used by the computer.

Activating microphones on a Chromebook:

Step 1: Locate the Command Panel First, find the clock on your screen, then click to see more options. This is like checking our spaceship's dashboard. Click on the settings gear, our control panel, to adjust our settings.

Step 2: Navigate to Sound Settings In the control panel's search bar, type "sound" to find our audio settings. It's like tuning into the right frequency. Select “Sound” from the options. This is where we control what we hear and how we speak to the computer.

Step 3: Connect to the Microphone Find "Input" to see our microphone options. It's important for PAL to hear us. Make sure the right microphone is selected. If there's more than one, pick the one you want to use.

Step 4: Test the Communication Line Look for a volume meter under "Input." This shows if our microphone is catching our voice. Say "Hello, PAL!" and watch the meter. If it moves, our microphone is working!

Step 5: If the microphone doesn't respond, check its connection. It might need a better link to our system. Make sure it's not on mute. We don't want to block our messages to PAL!


Our customer support specialists are on hand to ensure your implementation of Piper runs seamlessly.
View Support Docs or Contact Support
EXPANDED RESOURCES

Term Glossary


Circuit A conductive path for the flow of current or electricity.

Power The current or flow of electric charge and voltage.

Microcontroller An integrated circuit containing a microprocessor with memory and associated circuits.

Variables A value that can change depending on conditions or information passed to the program. A storage location with a symbolic name used to keep track of a value that can change while a program is running (similar concept to using X and Y in an algebraic equation). Variables are not only numbers; they can also hold text, including whole sentences (strings) or logical values (true or false).

Input Device A hardware device that sends data to a computer, allowing interaction and control.

Output Device A piece of hardware that converts information into a form humans can sense and understand.

View Full Glossary

Standards Alignment