Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction To Robot Sensors

Similar presentations


Presentation on theme: "Introduction To Robot Sensors"— Presentation transcript:

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 The relational operator ==
is equal to == In programming the “==” symbol compares values 6==3+3 is TRUE and 6==7 is FALSE In programming the “=” symbol is used to assign values SensorValue = 50; this statement assigns SensorValue a value of 50 equals = “=“ is an Assignment Operator it is used to assign the value of variable or expression. “==“ is a relation operator used for comparison (to compare value of both left and right side operands).

7 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.

8 How do Robots Make Decisions?
Robots make decisions by comparing values and deciding if they are true or false If SensorValue < 20 then move forward Else stop What is being compared here? What is the relational operator? What is the cutoff value? When would the robot stop? What is being compared here? The sensor value and the number 20 What is the relational operator? < less than What is the cutoff value? 20 When would the robot stop? When the sensor value is greater than 20

9 Conditional Statements
Conditional statements compare a sensor’s current reading to a cutoff value using a relational operator. What value represents that actual sensor reading? What value represents the cutoff value? What is the relational operator? When will the robot react to this statement? What value represents that actual sensor reading? SensorValue (rightEncoder) What value represents the cutoff value? 45 What is the relational operator? >= When will this robot do something? When the right encoder reads a value greater than or equal to 45

10 TRUE or FALSE TRUE FALSE

11 What Value/s Make the Condition 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 conditional statements are. 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 conditional statements are? 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


Download ppt "Introduction To Robot Sensors"

Similar presentations


Ads by Google