Introduction To Robot Sensors Introduction to Sensors What
Introduction To Robot Sensors
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? ©Carnegie Mellon University
What Sensor/s Do I Use? Smart Motor Bumper Switch Distance Sensor Gyro Sensor Color Sensor ©Carnegie Mellon University
What Sensor/s Do I Use? Smart Motor Bumper Switch Distance Sensor Gyro Sensor Color Sensor ©Carnegie Mellon University
Relational Operators Common Relational Operators equal to not equal greater less than to than or or equal to to == != > < >= <= What do relational operators do? ©Carnegie Mellon University
“=“ or “==“ The relational operator == is equal to 6==3+3 is TRUE and 6==7 is FALSE == In programming the “==” symbol compares values equals = In programming the “=” symbol is used to assign values Sensor. Value = 50; this statement assigns Sensor. Value a value of 50 ©Carnegie Mellon University
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! ©Carnegie Mellon University
How do Robots Make Decisions? Robots make decisions by comparing values and deciding if they are true or false If Sensor. Value < 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? ©Carnegie Mellon University
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? ©Carnegie Mellon University
TRUE or FALSE ©Carnegie Mellon University
What Value/s Make the Condition TRUE? ©Carnegie Mellon University
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. ©Carnegie Mellon University
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 Did you describe what a Boolean expression is? 2 True 1 0 Almost Not True Did you describe what a relational operator is? True Almost Not True Did you describe what conditional statements are? True Almost Not True Did you describe how sensors work? True Almost Not True Did you provide at least one example of how a robot can use True Almost Not True feedback from sensors to solve a multi-step problem True Did your description use full sentences? True Almost Not True Your description does not contain any spelling errors? True Almost Not True Your description was well thought out and easy to read True Almost Not True Add all of the points in points column to calculate total points 15 -16 A 13 -14 B 12 -11 C 10 D Points ©Carnegie Mellon University
- Slides: 13