Download presentation
Presentation is loading. Please wait.
Published bySimon Webster Modified over 6 years ago
1
Switch Blocks check a value and choose a path based on that value
2
When the program reaches the Switch Block it checks the value of the light sensor. Based on what it reports the program continues along either the top or bottom path.
3
Choose a Switch Block from the Flow Palette and place it on the sequence beam.
The Control is set to sensor, from the Sensor drop down menu choose Light Sensor. The Switch Block shows the Light Sensor symbol.
4
40 The configuration panel should have the Light Sensor on Port 3 and compare it’s reading against 40.
5
If the light sensor shows a light reading, anything above the threshold the program will run the blocks on the bright sun side. If the light sensor shows a dark reading, anything below the threshold the program will run the blocks on the dark sun side.
6
Add a Move Block to the top beam to go forward for 1 Rotation.
7
Add a Move Block to the bottom beam to go backwards for 1 Rotation.
8
Download and run the program. Make sure the Light Sensor is on Port 3.
Depending on the value the light sensor detects when it reaches the Switch Block the robot will either run forward or backwards.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.