follow the guidelines
DESCRIPTION
Follow The Guidelines. Introductory Presentation. Opening Activity. Make a prediction about how light sensors will use thresholds. Keep in mind: We used thresholds with the Sound Sensor in the Clap On, Clap Off Activity Light sensors can read values from 0 to 100 - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Follow The Guidelines](https://reader036.vdocuments.site/reader036/viewer/2022062407/56812c47550346895d90cbec/html5/thumbnails/1.jpg)
Follow The GuidelinesIntroductory Presentation
![Page 2: Follow The Guidelines](https://reader036.vdocuments.site/reader036/viewer/2022062407/56812c47550346895d90cbec/html5/thumbnails/2.jpg)
Opening ActivityMake a prediction about how light sensors
will use thresholds.
Keep in mind:
• We used thresholds with the Sound Sensor in the Clap On, Clap Off Activity
• Light sensors can read values from 0 to 100
• Thresholds divide the sensor readings into two categories
![Page 3: Follow The Guidelines](https://reader036.vdocuments.site/reader036/viewer/2022062407/56812c47550346895d90cbec/html5/thumbnails/3.jpg)
Opening Activity
A light sensor uses thresholds to divide the values that it receives into categories of “light” and “dark,” much like the Sound Sensor divides values into “loud” and “quiet.”
Light Sensor is over light surfaceLight Sensor is over dark line
![Page 4: Follow The Guidelines](https://reader036.vdocuments.site/reader036/viewer/2022062407/56812c47550346895d90cbec/html5/thumbnails/4.jpg)
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
![Page 5: Follow The Guidelines](https://reader036.vdocuments.site/reader036/viewer/2022062407/56812c47550346895d90cbec/html5/thumbnails/5.jpg)
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
![Page 6: Follow The Guidelines](https://reader036.vdocuments.site/reader036/viewer/2022062407/56812c47550346895d90cbec/html5/thumbnails/6.jpg)
ReviewRemember from Clap On, Clap Off that we are
able to calculate thresholds by taking example values with the Sound Sensor.
With the example values from the Light Sensor, calculate the sample threshold for the Light Sensor.
Value that the Light Sensor reads for lighter colors = 70
Value that the Light Sensor reads for darker colors = 52
Threshold = 61
![Page 7: Follow The Guidelines](https://reader036.vdocuments.site/reader036/viewer/2022062407/56812c47550346895d90cbec/html5/thumbnails/7.jpg)
Review
In Clap On, Clap Off, we used the threshold to tell the robot to wait for a value above or below the threshold.
![Page 8: Follow The Guidelines](https://reader036.vdocuments.site/reader036/viewer/2022062407/56812c47550346895d90cbec/html5/thumbnails/8.jpg)
Preview
Now we will use our threshold in a Switch block so that it has to make a decision between two different actions.
Action 1
Action 2
Above threshold
Below threshold
![Page 9: Follow The Guidelines](https://reader036.vdocuments.site/reader036/viewer/2022062407/56812c47550346895d90cbec/html5/thumbnails/9.jpg)
PreviewWhat will “action one” do?
Make a right turn
![Page 10: Follow The Guidelines](https://reader036.vdocuments.site/reader036/viewer/2022062407/56812c47550346895d90cbec/html5/thumbnails/10.jpg)
PreviewWhat will “action two” do?
Make a left turn
![Page 11: Follow The Guidelines](https://reader036.vdocuments.site/reader036/viewer/2022062407/56812c47550346895d90cbec/html5/thumbnails/11.jpg)
PreviewThe robot will do the side with the filled-in sun if it sees a value above the threshold
![Page 12: Follow The Guidelines](https://reader036.vdocuments.site/reader036/viewer/2022062407/56812c47550346895d90cbec/html5/thumbnails/12.jpg)
PreviewThe robot will do the side with the dark sun
if it sees a value below the threshold
![Page 13: Follow The Guidelines](https://reader036.vdocuments.site/reader036/viewer/2022062407/56812c47550346895d90cbec/html5/thumbnails/13.jpg)
Preview
Which direction will
the robot turn if the
Light Sensor reads 54?
Hint: look at the threshold
54 is above threshold, so your robot will make a right turn
![Page 14: Follow The Guidelines](https://reader036.vdocuments.site/reader036/viewer/2022062407/56812c47550346895d90cbec/html5/thumbnails/14.jpg)
Preview
We will also add a Loop block, which allows your robot to perform the same set of actions many times (click to see)
![Page 15: Follow The Guidelines](https://reader036.vdocuments.site/reader036/viewer/2022062407/56812c47550346895d90cbec/html5/thumbnails/15.jpg)
As you complete the activity, decide why you would want to run the same
behavior many times?
Preview
![Page 16: Follow The Guidelines](https://reader036.vdocuments.site/reader036/viewer/2022062407/56812c47550346895d90cbec/html5/thumbnails/16.jpg)
Now you have the necessary knowledge to get started in the Follow The Guidelines Activity.
Good Luck!