Introduction To Robot Sensors

Slides:



Advertisements
Similar presentations
Chapter 4 - Control Statements
Advertisements

While Loops and If-Else Structures
MONTEGO BAY HIGH SCHOOL INFORMATION TECHNOLOGY THE EXCEL IF FUNCTION.
Lesson 1-5 Solving Inequalities September Objective:
VEX and Robot C Chris Patterson Presented by Modified by J. Andazola.
Autonomy using Encoders Intro to Robotics. Goal Our new task is to navigate a labyrinth. But this time we will NOT use motor commands in conjunction with.
Chapter 4 Control Structures I. Objectives ► Examine relational and logical operators ► Explore how to form and evaluate logical (Boolean) expressions.
Programming Concepts (Part A) Ping Hsu. What is a program? WHITE CAKE RECIPE 1.Preheat oven to 350 degrees F (175 degrees C). 2.Grease and flour a 9x9.
COMP 14 Introduction to Programming Miguel A. Otaduy May 18, 2004.
If Statements Sections 1.25, Control Structures o All code thus far executes every line of code sequentially o We want to be able to repeat,
1 Selection Structures. 2 Making Decisions Sample assignment statements to figure worker pay with possible overtime PayAmount = Hours * Rate PayAmount.
Ch 1.4 – Equations & Inequalities
8/8/ Inequalities. 8/8/ Bumper Cars You must be at least 130cm tall to ride the bumper cars. This can be represented by the inequality.
Lesson Objective: I can…
Testbed: Exercises.
What is RobotC?!?! Team 2425 Hydra. Overview What is RobotC What is RobotC used for What you need to program a robot How a robot program works Framework.
ROBOTC Software Introduction. ROBOTC Software ROBOTC developed specifically for classrooms and competitions Complete programming solution for VEX Cortex.
GIRLS Robotic Camp. Let’s Begin Meet and Greet – Camp leaders introduce themselves – Students introduce themselves.
PAGES:51-59 SECTION: CONTROL1 : DECISIONS Decisions.
CONTROL STRUCTURE The if, elseif, and else & switch Statements 1.
Name:________________________________________________________________________________Date:_____/_____/__________ 1) x –(-4) = -102) -6x = 60 4) 3x + 2.
Order of Operations Lesson 1.3 Mr. Sparks & Mr. Beltz.
ENGR 101: Robotics Lecture 4 – Making Decisions Outline  The Stall Sensor  Making Decisions  Random Number Generation References 
Robotics NXT-G: variables, file Rotation sensor Lab: Use buttons to hit specific ball. Homework: Postings. Start planning mapping the room.
Chapter 51 Decisions Relational and Logical Operators If Blocks Select Case Blocks.
Lesson 1.4 Equations and Inequalities Goal: To learn how to solve equations and check solutions of equations and inequalities.
Lesson 7-3 Pages Inequalities PA Lesson Check 7-2.
Python Programming Module 4 Sensors and Loops Python Programming, 2/e1.
Introduction to Programming in RobotC
VEX IQ Curriculum Smart Machines Lesson 09 Lesson Materials:
Introduction To Robot Sensors
ROBOTC for VEX On-Site Professional Development
Robotics Programming Using Shaft Encoders
Exploring Computer Science Lesson 4-10 – Part 1
Introduction Situations in the real world often determine the types of values we would expect as answers to equations and inequalities. When an inequality.
Monday, December 11th 2017 Objective:
Movement using Shaft Encoders
Using Encoders to go Straight
An Introduction to Programming with C++ Fifth Edition
Introduction To Robot Decision Making
المحاضرة الثانية.
Inequalities Today’s Lesson: What: Why:
Introduction Situations in the real world often determine the types of values we would expect as answers to equations and inequalities. When an inequality.
While Loops and If-Else Structures
Computers & Programming Languages
Inequalities 12/3/2018.
6.5 Inequalities 12/3/2018.
Welcome to Interactive Chalkboard
Solving Equations with Variables on Both Sides Day 2
Pages:51-59 Section: Control1 : decisions
Introduction To Robot Decision Making
Understanding Problems and how to Solve them by using Computers
Computer Science Core Concepts
Conditional Logic Presentation Name Course Name
Learning Intention I will learn about programming using selection (making choices) with one condition.
RobotC While loop When and how to use the while loop
Robotics Programming Using Shaft Encoders
1-8 An Introduction to Equations
Robotics Programming Using Shaft Encoders
Chapter 3: Selection Structures: Making Decisions
Relational Operators.
Chapter 3: Selection Structures: Making Decisions
“Day C” February 5, :01 - 9:01 Math 9: :03 Science
Robotics Programming Using Shaft Encoders
Pages:51-59 Section: Control1 : decisions
Introduction Situations in the real world often determine the types of values we would expect as answers to equations and inequalities. When an inequality.
Solving Equations with Variables on Both Sides Day 2
Lego MINDSTORMS EV3.
Exploring Computer Science Lesson 4-10 – Part 1
Presentation transcript:

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

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

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

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

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.

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

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.

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

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

TRUE or FALSE TRUE FALSE

What Value/s Make the Condition TRUE?

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.

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 13-14 B 12-11 C 10 D