Page 167 - Computing E-Book Grade 6
P. 167
The City School 2021-2022
Control
The light orange blocks in the Control
category are all programming control
structures which can be used to affect
the flow of an EdScratch program. Loops, Robotics
waits and if-statement control blocks can
all be found in the Control category.
Sample Code
The following program will create square using commands from control block
Start
repeat 4
turn left LED on
turn right LED on
forwards for 3 inch at speed 5
spin right for 300 degrees at speed 5
turn left LED off
turn right LED off
beep
Sensing
The light blue blocks in the Sensing category are all
related to the Edison robot’s various sensors. These
blocks allow you to turn different sensors on or off,
clear stored sensing data and use sensing data
as value inputs (oval-shaped blocks) or Boolean
inputs (diamond-shaped blocks) inside blocks in an
EdScratch program.
167

