Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 72 - Ai Robogenius
P. 72

    You  will observe  the  on start  block  and  forever block  are already
                                     present in the workplace.

                        STEP - 5   Go to the Variables category and click on Make a Variable.

                                     A New variable name: window will appear.

                        STEP - 6   Type the name of a variable and click on OK button.

                        STEP - 7   Drag the set steps to 0 block inside the on start                  on  start
                                     block from the Variables category.                                 set  steps  to  0

                                     This sets the step counter to start from zero.

                        STEP - 8   Drag the on shake block into the workspace from the Input category.

                                                                 on  shake

                                                                                                    on  shake
                        STEP - 9   Drag the change steps by 1 block and place it
                                     inside  the on  shake  block  from the  Variables               change steps  by  1
                                     category.

                                     This will increase the step count by 1 every time you shake the Micro:bit.

                                     AI RoboGenius - V
                     70

| 67 68 69 70 71 72 73 74 75 76 77 |