© ALL RIGHTS RESERVED
Exercise 1: Movements• Create a program in the Scratch software to allow the Bird to start moving up and down in its nest. – Set the motor direction block to “that way”. – When the “space” bar is pressed, the whole program will come to a stop. Any unauthorized reprint or use of this material is prohibited.
Exercise 2: Distance Sensor• Create the following program to allow the Bird to move in its nest at varying motor power. – The motor power is defined by the “distance sensor value” block. – The program will detect for new distance sensor value after every 0.5 seconds. Any unauthorized reprint or use of this material is prohibited.
Exercise 3: Use of variable• This program made use of the variable value to do certain actions. – Create a variable “power” to store the detected “distance sensor value”. – The value of the variable “power” is used to define the motor power. – The “broadcast” program block is used to show the value of the variable “power”. – When the value of the variable “power” is 100, the “bird” sound will be played. Any unauthorized reprint or use of this material is prohibited.
Search
Read the Text Version
- 1 - 4
Pages: