The George Washington University Department of ECE ECE 1010 - Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 4.

Slides:



Advertisements
Similar presentations
Robofest 2005 Introduction to Programming RIS 2.0 RCX Code.
Advertisements

Programming Your Robot (in C)
The George Washington University Electrical & Computer Engineering Department ECE 002 Dr. S. Ahmadi Lab 1.
Photos and Sensor Instructions
Robot Programming. Programming Behaviors Behaviors describe the actions and decisions of your robot.
Connecting VEX and ROBOTC
©2006 CSUC Institute for Research in Intelligent Systems Introduction to Coding June 15, 2006.
Elevator Project Description Dr. S. Ahmadi ECE 002.
LEGO Mindstorms NXT Programming We will be using the Common Palette for our Robots This is how you download your program onto the brick Drag and drop a.
Music by Touch. 1. Provide an example “stimulus-sensor- coordinator-effector-response” framework for both your (human) sense of touch and the robotic.
Program ultrasonic range sensor in autonomous mode
The George Washington University Electrical & Computer Engineering Department ECE 002 Dr. S. Ahmadi Class 1.
Robotics NXT sensors Back to Light sensor: red vs blue ball.
The George Washington University Electrical & Computer Engineering Department ECE 002 Dr. S. Ahmadi Class 2.
Lego Robot Construction Project. Adam, Roger, Lu, Riana, Paul.
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 3.
Robotics Overview of NXT-G Actuators in Mindstorms. Touch sensor Labwork: Right turn. Touch/bump. [Explore move versus Motor Move mini & motor mini. Motor*.]
Introductory Robotics Workshop “Successful Strategies in Robotics” Terry Grant, NASA, Ames Research Center Jeneva Westendorf, Foothill High School 2/5/04.
7.2 V battery pack and charger Put the battery in the charger station at the end of the lab. period. Red light indicates charging. Ken Youssefi Introduction.
Robotics Light sensor. Calibration. Reverse engineering challenge. Lab work: Create and show your program. Add light sensor (different orientations). Robot.
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering –Intro to the Robotics –Introducing the IC –Discuss.
The George Washington University Department of ECE ECE 1010 Intro: Electrical & Computer Engineering –Introducing KIPR Link/Interface and Set-up –Continuation.
Programming Design ROBOTC Software Principles of Engineering
Overview of Project 3 Slides are available at : Updated 1/28 Due Date for project has been extended to next Friday 2/6.
Available at: Lesson 3.5 – Program Light Sensor in Autonomous Mode Program Light Sensor in Autonomous Mode.
Wall Encounter By Made easy by Dwayne Abuel.
2008 SBPLI/FIRST Programming Workshop Tom Boehm Patchogue Medford High School, Team 329 Motorola Inc. Mark McLeod Hauppauge High School Team 358 Northrop.
THE TOUCH SENSOR The Touch Sensor, shown in the picture, gives the robot the sense of touch. It gives too different signals when the orange part is ether.
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 4.
Erin Halseth, Will Gottschalk, Briana Warschun, and Michaella Gaines
Engineering H193 - Team Project Gateway Engineering Education Coalition Lab 1P. 1Spring Quarter Introduction to Sensors Lab 1.
Find the Mindstorms Icon on the computer.. To start a new program click go.
Photos and Sensor Instructions
Vex Robotics Program four: reversing and turning.
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 4/Lab3.
The George Washington University Electrical & Computer Engineering Department ECE 002 Dr. S. Ahmadi Class3/Lab 2.
ECE 002 Robots and Sensors Group 14. Objectives Research sensors and their usefulness to analyze data Research sensors and their usefulness to analyze.
Oregon Robotics Tournament and Outreach Program RCX Basics.
Rescue Robot Day 2 Exploring Computer Science Lesson 6-11.
Programming - Motion Intro to Robotics. Motors and Sensors Setup The first thing we need to do is tell ROBOTC that we have motors on our robot. Choose.
The George Washington University Electrical & Computer Engineering Department Dr. S. Ahmadi Class 3.
4) Design the logic to control the motor on a simple remote control car. There are two buttons on the remote control for the motor. If neither button is.
1 The George Washington University Electrical & Computer Engineering Department ECE 1010 Intro To Electrical and Computer Engineering Dr. S. Ahmadi Class.
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.
ROBOTC for VEX Online Professional Development. Homework Questions Thoughts? Questions?
Programming Design ROBOTC Software. Behavior-Based Programming A behavior is anything your robot does –Turning on a single motor or servo Three main types.
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 4.
Programming Design ROBOTC Software Principles Of Engineering
simple example program to control a DC-Motor
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Intro to the Robotics Introducing the IC Discuss.
ROBOTC for VEX Online Professional Development
By Sanjay and Arvind Seshan
ROBOTC for VEX Online Professional Development
Introducing KIPR Link/Interface and Set-up
Programming Design ROBOTC Software Computer Integrated Manufacturing
Programming Part 2 Mod Kit
RobotC Sensors.
Logic Gates Practical Objective: to develop an understanding of logic circuits and truth tables.
Forward Until Touch Robot goes forward until it hits a wall.
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 5.
Switch Blocks check a value and choose a path based on that value
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 4.
SENSORS.
Programming Design ROBOTC Software Principles Of Engineering
Photos and Sensor Instructions
Programming Design ROBOTC Software Principles of Engineering
Programming Concepts (Part B) ENGR 10 Introduction to Engineering
Oregon Robotics Tournament and Outreach Program
Exploring Computer Science Lesson 6-11
Downloading to the NXT requires the correct hardware setup
Presentation transcript:

The George Washington University Department of ECE ECE 1010 - Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 4

Touch Sensors Is a type of digital sensor: - Returns a 0 if NOT hit - Returns a 1 if HIT - As with any digital sensor, it is either “ON” or “OFF” - Digital sensors connect to digital ports (7-15) on the “lower deck” of the handyboard (see diagram of the handyboard on the next slide)

Digital Ports

Touch Sensor Digital sensor Connect to digital ports 8-15 on the KIPR Link Access with function digital(port#) 1 indicates switch is closed 0 indicates switch is open

Utilizing the touch sensor to help robot turn intelligently Write an IC program that does the following: runs forward for an unspecified amount of time detects a “hit” using a digital sensor attached to the front of the robot and then backs up (for x seconds --- you decide what number is best for x – HINT use a variable!) Download and run

Simple Example To Use Bumpers // Program to make a robot go forward. // If hit detected, go backwards for 4 seconds. int main() { while( a_button()==0 ){ } // Waits for user to press start button. while(1) motor (1,70); // Turn on motor 1, @ 3% of speed. motor (3,70); // Turn on motor 3, @ 3% of speed. if ( digital(13)==1 ) // Check sensor connected to port motor (1, -70); // Turn on motor 1, @ 3% of speed in opposite direction. motor (3, -70); // Turn on motor 1, @ 3% of speed in opposite direction. sleep(4); } return 0

Classwork AA1FB int main() { } fd(2); sleep(3); bk(0); bk(2); ao();

Classwork AA2Sen int main(){ while(1){ printf("Sensor reading : %d\n", analog10(0)); msleep(500); } return 0;

Classwork AA3FSenB_once int main(){ bk(0); bk(2); int color_threshold = 200; while(1){ if(analog10(0) > color_threshold && analog10(1) > color_threshold) break; fd(0); fd(2); msleep(100); } bk(0); bk(2); sleep(2); ao(); return 0; }

Classwork AA4FSenB_loop int main(){ int color_threshold = 200; bk(0); while(1){ if(analog10(0) > color_threshold && analog10(1) > color_threshold) break; fd(0); fd(2); msleep(100); } bk(0); bk(2); sleep(2); ao(); msleep(100); } return 0;

Classwork AA5SenB_three int main(){ int color_threshold = 200; bk(0); int n = 1; while(n <= 3){ while(1){ if(analog10(0) > color_threshold && analog10(1) > color_threshold) break; fd(0); fd(2); msleep(100); } bk(0); bk(2); sleep(2); ao(); n = n+1; msleep(100); } return 0;