Users Manual

SCRATCH CODING KIT
Connecting to the main cell
Coding the streetlight using the volume sensor
Do you remember how you coded the streetlight using the brightness sensor?
Now, we are going to use the volume sensor to code the streetlight. Since we learned how to turn on and off the
streetlight, now we are going to make a streetlight that changes its brightness depending on the analog value.
We used the ‘digital output/off’ block to turn the LED sensor on and off. For the analog value ouput, let’s see which
block we should use. Drag in the block below to the script.
Did you drag in the block from the movement tab? Ompared to the ‘digital output/off’ block this block shows the
output value in numbers. Basically, it can control the brightness by typing in the output value.
Let’s use the streetlight here. We should connect the volume sensor instead of the brightness sensor. Connect the
brightness sensor to analog input port 0 (port 1) and the LED sensor to analog output port 9 (port 17).
Analog output Analog input
B
R
W
B
R
W
569
012345
11 12 13 14 15 16 17181 2345678