Getting Started Guide
SCRATCH CODING KIT
introduction
TORI piano
Code TORI Piano (Principle)
The TORI Piano is a model for recording and playback in Scratch, and we will code the program using the button
sensor, the infrared sensor and the LED sensor.
The key of this coding is that if you press and hold the infrared sensor connected to the input digital port 3 for
more than 2 seconds to record, and if you press and release it for less than 2 seconds, the existing recorded sound
will be played back.
TORI Piano uses 7 button sensors, 1 infrared sensor, and 1 LED sensor.One infrared sensor plays the role of record-
ing and playback, and the remaining seven button sensors are the sensors responsible for the sound of Do Re Mi
Fa So La Ti. An LED sensor is a sensor to let you know that you are recording by making it light during recording.
Now keep these things in mind as you start coding.
Let’s go over the steps to take into consideration before coding the TORI piano in detail. The process of coding
with an overall guideline on what actions we should express and how we can express them is very important.
Let's take a quick look at the basic behaviors we need to implement.
1. Let's take a quick look at the basic behaviors we need to implement.
2. When the recording starts, it saves the scale and beat you have pressed. Pressing the infrared sensor again will
end the recording and play back the corded sound.
3. If you press the infrared sensor of port 8 for more than 2 seconds, the existing sound is deleted, and new re-
cording is done. If you press and release it for less than 2 seconds, the previously recorded sound will be played
back.
4. The button sensor for each scale must play the sound once if the button sensor was pressed once.
Should we start making the TORI Piano now?