Getting Started Guide
SCRATCH CODING KIT
Coding the DJ Box
Coding the DJ Box
If you have exhausted the infrared sensor values, we will make the DJ box play different bits as the infrared sensor
shows.
Scratch can make a lot of sound including drum beat. Go to the palette and choose Sound template.
Bring a block that looks like this
Make sure you hear sound from your computer and click on the block. You can hear the drums on your computer.
If you want to hear other drum sounds, try changing the value of the drum.
Now, if your infrared sensor is to the left of the "C" area of the gradient on the previous page, try creating a simple
program that makes a sound. In this case, the value of the "C" box is the threshold value. Here is the flowchart
showing how it works.
NO
YES
Is the value of
the IR sensor
less than 'c'?
Play the beat
Don't do anything