Download presentation
Presentation is loading. Please wait.
Published byReagan Anguish Modified over 10 years ago
1
Forward Until Dark
2
NXT Light Sensors
3
How does the Light Sensor detect brightness? The Light Sensor shines a red light on the surface below it and reports how much of that light is reflected back. A bright surface will reflect a lot of light and give a high reading. A dark surface will reflect less light and give a low reading.
4
Forward Until Dark Program
5
Establishing The Threshold On the NXT –Select the View Mode –Select Reflected Light –Select Port 3 Position the robot over the surface to be read by the light sensor as shown in the next two slides
6
Establishing The Light Threshold
7
Establishing The Dark Threshold
8
Calculating The Threshold
9
Motor Block One Details
10
Light Sensor Block Two Details
11
Motor Block Three Details
12
Test Your Robot
13
Forward Until Light
14
Forward Until Light Light Sensor Block Two Details Wait for the Light Sensor on Port 3 to get a Light reading Light = Light Sensor value>Threshold value
15
Test Your Robot
16
Calculating Thresholds Quiz Would the robot classify the following Light Sensor readings as Light or Dark? a. Sensor = 15 with Threshold = 40 b. Sensor = 55 with Threshold = 40 c. Sensor = 49 with Threshold = 56 d. Sensor = 15 with Dark = 10 and Light = 30 e. Sensor = 55 with Dark = 43 and Light = 62
17
Calculating Thresholds Quiz Answers a. Sensor = 15 with Threshold = 40 Sensor value is less than Threshold therefore it is dark b. Sensor = 55 with Threshold = 40 Sensor value is greater than Threshold therefore it is light c. Sensor = 49 with Threshold = 56 Sensor value is less than Threshold therefore it is dark
18
Calculating Thresholds Quiz Answers d. Sensor = 15 with Dark = 10 and Light = 30 The threshold is (10+30)/2=20 The Sensor Value is less than Threshold, therefore it is Dark. Intuitively - the Sensor value is closer to Dark than Light, therefore it is dark e. Sensor = 55 with Dark = 43 and Light = 62 The threshold is (43+62)/2=52 The Sensor Value is greater than Threshold, therefore it is Light. Intuitively - the Sensor value is closer to light than dark. Therefore it is light.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.