Introduction to Sensors

Slides:



Advertisements
Similar presentations
Introduction to Programming
Advertisements

Robofest 2005 Introduction to Programming RIS 2.0 RCX Code.
Variables and Functions ROBOTC Software. Variables A variable is a space in your robots memory where data can be stored, including whole numbers, decimal.
While Loops and If-Else Structures
08/2012Tanya Mishra1 EASYC for VEX Cortex Llano Estacado RoboRaiders FRC Team 1817.
© 2006 Carnegie Mellon Robotics Academy Designed for use with the LEGO MINDSTORMS ® Education NXT Software and Base Set #9797 Mine Mapping Remote Communication.
Automation and Robotics
VEX and Robot C Chris Patterson Presented by Modified by J. Andazola.
Vex Robotics Introduction to Sensors. introduction to sensors Sensors assist robots in seeing and feeling the physical world through which they travel.
Programing Concept Ken Youssefi/Ping HsuIntroduction to Engineering – E10 1 ENGR 10 Introduction to Engineering (Part A)
Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc. Programming in easyC.
LEGO Mindstorms NXT Carnegie Mellon Dacta Lego Timothy Friez Miha Štajdohar SOURCES:
Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc. Touch Sensor This lesson will explain how to hook a standard micro switch into the Vex system to function.
Testbed: Exercises.
ROBOTC Software Introduction. ROBOTC Software ROBOTC developed specifically for classrooms and competitions Complete programming solution for VEX Cortex.
Open and Closed Loops Standard Grade Computing Studies.
Program ultrasonic range sensor in autonomous mode
Programming Concepts Part B Ping Hsu. Functions A function is a way to organize the program so that: – frequently used sets of instructions or – a set.
Programming Concepts (Part B) ENGR 10 Introduction to Engineering 1 Hsu/Youssefi.
Introduction to the VEX ® Robotics Platform and ROBOTC Software © 2012 Project Lead The Way, Inc.Principles of Engineering.
Teacher/Mentor Institute Using easyC Joel Kirkland July 30-31, 2015.
Programing Concept Ken Youssefi/Ping HsuIntroduction to Engineering – E10 1 ENGR 10 Introduction to Engineering (Part A)
AUTOMATION WITH ROBOTC Starting to write and troubleshoot computer code.
Sentry System Multiple Sensors
Lego MindStorm An Introduction to Blocks. Blocks Blocks are used to give instructions to your robot. There are many types of blocks You can use the blocks.
Robotics NXT-G: variables, file Rotation sensor Lab: Use buttons to hit specific ball. Homework: Postings. Start planning mapping the room.
Variables and Functions ROBOTC Software © 2012 Project Lead The Way, Inc.Principles of Engineering.
Agenda Perform Quiz #1 (20 minutes) Loops –Introduction / Purpose –while loops Structure / Examples involving a while loop –do/while loops Structure /
While and If-Else Loops ROBOTC Software. While Loops While loop is a structure within ROBOTC Allows a section of code to be repeated as long as a certain.
Variables and Functions ROBOTC Software. Variables A variable is a space in your robots memory where data can be stored, including whole numbers, decimal.
Mindstorm NXT-G Introduction Towson University Robotics.
BEGINNER FLL PROGRAMMING WORKSHOP BY DROIDS ROBOTICS & EV3LESSONS.
VEX and Robot C Chris Patterson Frisco ISD CTE Center Presented by.
Automation and Robotics.  First you select the platform type so that you can use Natural Language PLTW.
Vex Robotics program three: using motors and sensors together.
Casne.ncl.ac.uk Taking care of the CrumbleBot Please do NOT stress the robot's motors 1.Do NOT push the robot 2.Do NOT hold the.
Programming Design ROBOTC Software. Behavior-Based Programming A behavior is anything your robot does –Turning on a single motor or servo Three main types.
Robotics Programming Wall Follow Line tracking for a set amount of time Line tracking for a distance.
Python Programming Module 4 Sensors and Loops Python Programming, 2/e1.
ROBOTC for CORTEX Teacher Training © 2011 Project Lead The Way, Inc. Automation and Robotics VEX.
Programming Design ROBOTC Software Principles Of Engineering
Introduction to Programming in RobotC
Variables and Functions
Programming Concepts (Part B) ENGR 10 Introduction to Engineering
INTRODUCTION TO ROBOTICS Part 5: Programming
Variables and Functions
Variables and Functions
Advanced EasyC Jim Cline July 20-21, 2017.
Programming Concepts (Part B) ENGR 10 Introduction to Engineering
Variables and Functions
Variables and Functions
Variables and Functions
Variables and Functions
Variables and Functions
Automation and Robotics
While Loops and If-Else Structures
Sensors and Logic Switches
Variables and Functions
While Loops and If-Else Structures
Programming Design ROBOTC Software Principles Of Engineering
While Loops and If-Else Structures
While Loops and If-Else Structures
While Loops and If-Else Structures
if-else Structures Principles of Engineering
Robotics Programming Using Shaft Encoders
While Loops and If-Else Structures
While Loops and If-Else Structures
Programming Concepts (Part B) ENGR 10 Introduction to Engineering
While Loops And If-Else Structures
Presentation transcript:

Introduction to Sensors

What are sensors? Your answers here!

What are sensors? A sensor tells a robot one simple thing about it’s environment Temperature Distance Light intensity Allow robots to see and feel the physical world through which they travel Two main types of sensors: digital and analog

Analog Sensors Can provide a range of feedback The robot will interpret feedback from the sensor as a number from 0 to a pre-defined maximum (1024 for most Vex sensors) A light sensor has many states: If it is very bright, the sensor will return a number close to 30 If it is very dark, the sensor will return a number close to 1000

Digital Sensors Can distinguish between two different “states” The meaning of the states depends on the sensor A bumper sensor has two “states” If it is pressed, it is a 0 If it is not pressed, it is a 1

Variables A value-holding “container” with a label You can retrieve the value in this “container” when it is needed There are different types of values you can store in variables. You will use the “int” type, which allows you to store any whole number from 0 to a large number (positive or negative) You can assign a starting value to your variable which will store that value at the start of the program

Bump Sensor Introduction Open the project “BUMPERTEST.ECP” Download it to your robot and open the terminal window

Understanding bump sensor code Comments - allows you to leave notes to yourself and others about your code The compiler ignores comments

Understanding bump sensor code While Loop – block of code that repeats itself as long as the condition inside the parenthesis is true The == operator returns true if both sides are equal, and false if they are not equal In our code loop will always equal 1, so this loop will run forever

Understanding bump sensor code Bumper sensor – stores the value of the digital input 6 to the variable “bumper” Now the robot knows if the bump sensor is being pressed in (0) or not (1)

Understanding bump sensor code Print to screen – displays information in the terminal window This particular code displays the value of the bump sensor For now, make sure your settings are as follows: * Variable: the variable you want to display * Message: the message with the variable * Directive: %d * Type-cast: int

Writing your own code We are going to write a program that runs one motor until a bump sensor is pressed in Begin by opening easyC