Sound Controlled Phiro

Create a program in Pocket Code to move Phiro in response to sound, using your mobile device's Loudness Sensor.

Objective

By the end of this lesson, learners will

  • Understand and use the computational concept of Variables and Control to create a program
  • Create a program to control hardware with sound
  • Connect the physical and mobile digital worlds
  • Develop greater fluency of sequence and debugging
  • Practice experimenting & iterating
  • Express their creativity by programming a robotic sound control system.
Subjects

Coding, Sensors, Sound Control

Age

9 & above

Duration

30 min

Robot & Accessories Needed

Phiro Pro robot

  • step1
  • step2
  • step3
  • step4
  • step5
  • step6
STEP 1

ASK

How does your smartphone or tablet's microphone work?

How would you use these to control something other than your phone?

STEP 2

IMAGINE

Imagine how you would control Phiro using sound. What would you need in Phiro and Pocket Code?

How would you control Phiro speed with loudness?

1. Detect sound

2. Change Phiro speed based on loudness - 0-100 Sound changes

STEP 3

PLAN

Plan your sound control

Detect & display sound value from environment on your mobile device. Explore the Sensors Loudness blocks in Pocket Code. The loudness blocks syncs to your mobile device microphone. The higher the volume of sound in the background, the higher the value of loudness block.

Phiro Sound Control: Check the microphone value or loudness block in Pocket Code. Create variables to detect and display value of the variable in pocket code program. Try this script to check the values of loudness using mobile sensor.

STEP 4

Create

Set Phiro speed based on loudness.

STEP 5

Remix

Remix your sound control program for Phiro to REVERSE sound control : Lower the sound, greater Phiro's speed!

Remix - LED control by sound

STEP 6

Share

Share your sound control Phiro creation using #MyPhiro and we will share it with the world!