Professional Documents
Culture Documents
(FLOW CONTROL
BLOCKS)`
LEGO MINDSTORMS
Education EV3
FLOWCONTROL
BLOCKS
• Flow Control blocks are the blocks that is being use to manage
the flow of the program that you build.
• This block is best applicable when you want to manipulate a
sequence of a program that will be running.
• There are Five blocks inside the tab of the Flow Control
Blocks and these are the ff:
-Start -Switch
-Wait -Loop Interupt
-Loop
FLOW CONTROL BLOCKS
2. WAIT 4. SWITCH
START
INPUTS
Seconds: Positive Number
Compare Type: Equal(0), Not Equal(1), Greater Than (2), Greater
Than or Equal To (3), Less Than(4), Less Than or Equal To (5)
Threshold Value: Number
Direction: Number
Amount: Number
WAIT
Mode Selector
3. The 13
different modes
LOOP
• This block works as a repeat. The code inside the loop will
repeat until a certain condition is met. Conditions Include:
Unlimited Once the condition is met, the robot may exit the
loop.
LOOP
INPUTS
Count: Number
Seconds: Number
Until: Boolean
Compare Type: Equal (0), Not Equal (1), Greater Than (2), Greater
Than or Equal To (3), Less Than (4), Less Than or Equal To (5)
Threshold Value: Number
LOOP
Mode Selector
3. The 16
different modes
3 Different Mode of Loop
Block
• Unlimited Mode
• Loop Count
• Loop Logic Mode
SWITCH
• The Switch block is a container
that can contain two or more
sequences of programming
blocks. Each sequence is called a
Case. A test at the beginning of
the Switch determines which
Case will run. Only one Case will
run each time the Switch is
executed.
SWITCH
INPUTS
Logic: Boolean
Number: Number
Text: Text
Compare Type: Equal (0), Not Equal
(1), Greater Than (2), Greater Than or
Equal To (3), Less Than (4), Less
Than or Equal To (5)
Threshold Value: Number
SWITCH
Mode Selector
3. The 15
different modes
SWITCH VIEW
• Flat View
• Tabbed View
LOOP INTERRUPT
12.
14.
LIGHT/COLOR SENSOR
Anatomy of EV3
Sensors a.k.a. “Eyes”
Color Sensor
• Detects Colors
• Measures Light Intensity
EV3’s Sensor Blocks
The Colour Sensor block gets data from the Colour Sensor. You can
measure the colour or intensity of light and get a Numeric output.
You can also compare sensor data to an input value and get a Logic
(True or False) output.
Port Selector
Mode Selector
Input
Outputs
Line Followers:
Basic to
Proportional
Which Program Works
Best for Which Situation?
Simple Line Follower Smooth Line Follower
• Most basic line follower • Almost the same as simple
• Wiggles a lot due to sharp • Turns are less sharp
turns • Has trouble on sharp curves
• Good for rookie teams need • Good for rookie teams need to
to know loops and switches know loops and switches