top of page

Watch/Listen Here:

OR Read below:

 STEP 3: Sensors 

portsidedistance.png

Since you know how to control the brightness of the LED and pitch of the SPEAKER using a specific number that you set with the dial, what if instead, we use other factors as the controller?

distance.png

Pick up the DISTANCE block. Notice how it only has one male connector, meaning that it can only send values to connected blocks.

Protruding on the other side is a pair of circular "eyes". Using ultrasonic sound waves similar to a bat, the sensor can figure out the distance between its "eyes" and an object in front of it.

Now replace the NUMBER block from your previous setup with the DISTANCE block.

Clear about a 2 feet of space in front of the DISTANCE block to test it out.

with paper.png

Using your hand or a flat object like a sheet of paper, slowly move back and forth while keeping aligned with the sensor and watch or listen to the SPEAKER and LED blocks react!

distancespace.png
farther.png

When the object is closer to the sensor, is the pitch of the SPEAKER higher or lower? Is the LED brighter or dimmer?

with paper.png

You will notice that as the object gets closer, the DISTANCE sensor sends a smaller value, which results in the pitch of SPEAKER and brightness of LED lowering.

Short Distance

Low Pitch

Low Brightness

High Pitch

High Brightness

Long Distance

There are many kinds of sensors for you to try! You can go to Meet the Blocks to check them out. Most of the "INPUTS" are sensors! Here's one combination I recommend:

color.png
rgb.png

The COLOR block can read the color of an object over it. The RGB block, which is basically an LED that can display the full rainbow of colors, can receive the signal from the COLOR block and show you the actual color being sensed!

Challenge Yourself!

Can you use the COLOR block next to the SPEAKER block to hear what different colors sound like?

​

Which is the higher pitch? Red or Green? Can you figure out the order of colors from low to high pitch?

​

Hint: You can also add the RGB block to see and check the color that is being read by the sensor.

colorspeake.png

Red is lower than green because the order from low to high is Red, Orange, Yellow, Green, Blue, Purple, Pink!

 STEP 2 

redled.png
number.png

 A Basic Setup 

speaker.png

Onward!

 STEP 4 

 Conditionals 

ifgreater.png
ifequal.png

 TUTORIAL UNDER CONSTRUCTION 

bottom of page