Switch block tree Pro Preview

When we use one switch block, we allow the program to make a decision in accordance with the condition we have set. But what should we do if several conditions have to be met?

To access the full video please subscribe to FLLCasts.com

Subscribe

  • #1177
  • 29 Mar 2019

One option is to put a switch block in another switch block:

content picture

This example shows the combinations between two touch sensors. As a result, the robot will execute the programmed operations: 1 - when both buttons are pressed, 2 - when only the first button is pressed, 3 – when only the second button is pressed and 4 – when both buttons are released. Following the same logic, if we have more conditions, we may include more switch blocks.

Courses and lessons with this Tutorial

This Tutorial is used in the following courses and lessons

Image for Robotics with LEGO - Level 3.0 - Security systems
  • 50
  • 1:03
  • 213
Image for Lesson 7 - Card reader
  • 6
  • 7
  • 8
  • 3d_rotation 1