Page 53 - RoboGenius Pro C5
P. 53
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.
Creative Projects with Micro:Bit
51

