Download presentation
Presentation is loading. Please wait.
1
Introduction To Robot Sensors
When - after students have learned about Boolean expressions and relational operators Goal - students to develop a mental model of how robots make decisions The lesson includes: an introduction to sensors and how conditional statements compare sensor feedback to cutoff values to make decisions What students know At the end of this lesson students will be able to: Describe several sensors and the type of feedback that they send to the robot, Interpret and write a conditional statement, And, describe how conditional statements are used to control a robot’s behavior. Teacher background information Boolean expressions Relational operators Example conditional statement Note about Logical Operators Teacher directions to implement the lesson Help students understand what a Boolean expression is Introduce students to the type of sensors that they are using Introduce student to TRUE of FALSE decision making Check students’ understanding of robot decision making Assign students to describe how robots make decisions
2
Introduction to Sensors
What sensor would I use as an emergency stop? What sensor would I use to sort red and blue balls? What sensor would I use move a specific distance? What sensor is used to measure the distance from an object? What sensor would I use as an emergency stop? Bumper Switch What sensor would I use to sort red and blue balls? Color Sensor What sensor would I use move a specific distance? Smart Motor What sensor is used to measure the distance from an object? Distance Sensor
3
What Sensor/s Do I Use? Smart Motor Bumper Switch Distance Sensor
Gyro Sensor Color Sensor Bumper Switch or Distance Sensor Gyro Sensor or Smart Motor Smart Motor Color Sensor Color Sensor plus a Smart Motor
4
What Sensor/s Do I Use? Smart Motor Bumper Switch Distance Sensor
Gyro Sensor Color Sensor 6. Color Sensor plus a Distance Sensor 7. Distance Sensor plus either a Smart Motor or a Gyro Sensor 8. Color Sensor and a Distance Sensor 9. Color Sensor and Smart Motor 10. Smart Motor and a Gyro Sensor
5
Common Relational Operators
equal to not equal to greater than less than greater than or equal to less than or equal to == != > < >= <= What do relational operators do? Relational operators compare the two values and the result is either TRUE or FALSE.
6
Decision Making and Cutoff Values
What is a cutoff value? 68° A cutoff value is a predetermined value where a decision is made. If it’s over 68° I like to wear shorts! Can you think of other examples where cutoff values are used? Other examples include: Amusement parks – You have to be a certain height to ride a rollercoaster. Height is the cutoff value. Speed Limits – Roads have speed limits. Speed is the cutoff value. When ice melts – 32 degrees Fahrenheit or 0 degrees Celsius Banks – If you have a certain amount of money in your bank account some banks reduce specific fees. Amount of money is the cutoff value. Can you think of other examples where cutoff values are used?
7
How do Robots Make Decisions?
Robots make decisions by comparing values and deciding if they are true or false What is being compared here? What is the relational operator? What is the cutoff value? When would the robot react to this statement? What is being compared here? The value of the right motor encoder and the number 25 What is the relational operator? < less than or equal to What is the cutoff value? 25 When would the robot react to this command? When the sensor value of the right motor encoder is greater than or equal to 25
8
How do Robots Make Decisions?
Robots make decisions by comparing values and deciding if they are true or false Using the answers to the questions below can we rewrite the statement in RED to make it more accurate? What is being compared here? What is the relational operator? What is the cutoff value? When would the robot act on this statement? Something like: Robots make decisions by comparing a sensor value to a cutoff value using relational operators and determining if that condition is true or false
9
Conditional Statements
Conditional statements compare a sensor’s actual sensor reading to a cutoff value using a relational operator. What value is the actual sensor reading? What value is the cutoff value? What is the relational operator? When will this robot react to this statement? What value is the actual sensor reading? getMororEncoder (rightMotor) What value is the cutoff value? 25 What is the relational operator? >= greater than or equal to When will this robot react to this statement? When the right motor encoder reads a value greater than or equal to 25
10
TRUE or FALSE Cutoff Values
A cutoff value is the second part of the Boolean expression. In the example 1 on the slide the cutoff values is >=25 (greater than or equal to 25) therefore any value greater than or equal to 25 would make that statement TRUE. ANSWERS TRUE FALSE
11
What Value/s Make the Condition TRUE?
Sketch the number lines on a piece of paper to identify what values are TRUE
12
Your Job Describe how robots make decisions. In your description:
Describe what a Boolean expression is, What relational operators are, What sensors are, And, what a cutoff value is. Provide at least one example of a how a robot used feedback from sensors to complete a multi-step task. Use the Robot Decision Making Self-Assessment Guide to evaluate your work.
13
Robot Decision Making Self Assessment Guide
Read the project requirements on the left side and then rate how well you met the project requirements by answering the questions using true, almost true, and not true. Project Requirements 2 1 Points Did you describe what a Boolean expression is? True Almost Not True Did you describe what a relational operator is? Did you describe what a cutoff value is? Did you describe how sensors work? Did you provide at least one example of how a robot can use feedback from sensors to solve a multi-step problem Did your description use full sentences? Your description does not contain any spelling errors? Your description was well thought out and easy to read Add all of the points in points column to calculate total points 15-16 A B C D
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.