80 likes | 98 Views
Introduction to the Light Sensor. Introductory Presentation. Threshold. A "threshold” is a cutoff point that divides all values into two possible categories. We need to insert a threshold for some sensors, so that they know what we want them to see. Opening Activity.
E N D
Introduction to the Light Sensor Introductory Presentation
Threshold A "threshold” is a cutoff point that divides all values into two possible categories. We need to insert a threshold for some sensors, so that they know what we want them to see.
Opening Activity Make a prediction about how light sensors will use thresholds. • Light sensors can read values from 0 to 100 • Thresholds divide the sensor readings into two categories • For a light sensor, these categories will be ‘light’ and ‘dark’.
Opening Activity A light sensor uses thresholds to divide the values that it receives into categories of “light” and “dark,” Light Sensor is over light surface Light Sensor is over dark line
Discussion Questions What is the difference between the values that the Light Sensor reads for darker colors versus lighter colors ? Higher numbers equal brighter colors and lower numbers equal darker colors
Discussion Questions You can read the Light Sensor values by going into View Mode First, select the “Reflected Light” option Then, select the port number Finally, read the light sensor value
Review We are able to calculate thresholds by taking example values with the Light Sensor. In View Mode, hold the light sensor over the white part of the mat and read the value. Then hold the sensor over a black area, and read the value. To find the middle of this range, calculate the mean. Value that the Light Sensor reads for lighter colors = 70 Value that the Light Sensor reads for darker colors = 52 Threshold = 61 With the example values from the Light Sensor, calculate the sample threshold for the Light Sensor.