Users Manual
SCRATCH CODING KIT
Experiencing
the Brightness sensor coding
Coding the windmill with the brightness sensor
The button sensor ‘is the sensor digital 2 pressed?’ was used earlier as the condition to operate the windmill. For
the button sensor, the first value was ‘false’ and it turned ‘true’ when the button was pressed.
But, the brightness sensor shows ‘true’ from the beginning. Therefore, we need an opposite condition to correctly
operate the windmill.
Bring the ‘not’ block from the calculation tab and combine it with the condition block. This denies the condition.
Basically, it makes the condition opposite. Now, the condition that operates the motor is ‘when the brightness
sensor’s digital value is false’!
Make the script above. If the script above is activated, the DC motor will operate when the
brightness sensor is covered.