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

Slides:



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

RCX Workshop Day 2 Programming with Touch Sensor Light Sensor Repeat CJ Chung Associate Professor of Computer Science Lawrence Technological University.
Engineering Roles We will be forming groups of 3 students
Boe-Bot Challenge. Advanced Users (those who have used Boe-Bots in Digital Electronics) There are suggested activities / programs for each challenge.
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.
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.
ECE 1020 FINAL PRESENTATION TA: Allen Guan and Sibel Ahmed Shehzad Mufti.
The George Washington University Electrical & Computer Engineering Department ECE 002 Dr. S. Ahmadi Class 1.
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.
Capacitor Connection in to LED socket Connection to 5v and ground Connection to light sensor pin.
Overview of Project 1 Slides are available at : Report due next week Matthew Murach.
The George Washington University Electrical & Computer Engineering Department ECE 002 Dr. S. Ahmadi Class 2.
Members (from left to right): Rachel Bevill, Brae Bower, Samantha Cherbonneau, Professor Ahmadi, Anthony Contreras.
Programming Concepts (Part B) ENGR 10 Introduction to Engineering 1 Hsu/Youssefi.
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 3.
The Batmobile and Centrifuge November 11, Members (from left to right): Rachel Bevill, Brae Bower, Samantha Cherbonneau, Professor Ahmadi, Anthony.
Today’s Agenda 1.Scribbler Program Assignment 1.Project idea due next class 2.Program demonstration due Wednesday, June 3 2.Attendance & lab pair groupings.
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.
EV3 Workshop Oct 3, 2015 Instructor: Chris Cartwright
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.
A note on oral presentations These are the progress report presentations. Please note that the individual presentations should be ~8 min long. Since the.
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
Robotics NXT-G: variables, file Rotation sensor Lab: Use buttons to hit specific ball. Homework: Postings. Start planning mapping the room.
Robot Programming. Programming Behaviors Behaviors describe the actions and decisions of your robot.
ECE Project 1 Overview. Project Description The aim of this project is to design a robot that moves along a given path, from the Start point, towards.
Vex Robotics Program four: reversing and turning.
The George Washington University Electrical & Computer Engineering Department ECE 002 Dr. S. Ahmadi Class3/Lab 2.
The George Washington University Electrical & Computer Engineering Department Dr. S. Ahmadi Class 3.
BEGINNER FLL PROGRAMMING WORKSHOP BY DROIDS ROBOTICS & EV3LESSONS.
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.
Connect VEX and ROBOTC Electrical Engineer Responsibilities © 2011 Project Lead The Way, Inc.Automation and Robotics VEX.
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.
Robotics Programming Wall Follow Line tracking for a set amount of time Line tracking for a distance.
LOGICFUSION’S HANDS-ON ROBOTICS EV3 LEVEL 2! Welcome to.
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 4.
Programming Design ROBOTC Software Principles Of Engineering
Electrical Engineer Responsibilities
Programming Concepts (Part B) ENGR 10 Introduction to Engineering
VEX IQ Curriculum Smart Machines Lesson 09 Lesson Materials:
ROBOTC for VEX Online Professional Development
Electrical Engineer Responsibilities
Touch Sensor.
Introducing KIPR Link/Interface and Set-up
Electrical Engineer Responsibilities
Programming Design ROBOTC Software Computer Integrated Manufacturing
Programming Part 2 Mod Kit
Programming Concepts (Part B) ENGR 10 Introduction to Engineering
Electrical Engineer Responsibilities
IMDL Summer 2007: RoBeDeS by David Ladolcetta.
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.
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 4.
Automation and Programming
SENSORS.
Programming Design ROBOTC Software Principles Of Engineering
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 4.
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
Presentation transcript:

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

ECE 001 Class 4 Agenda –Practicing 90 degree turns. –More Robot Building! –Exercise on Using Bumpers –BONUS: Using analog sensors

Maze Specs Start point 1.5’ 4’ End Point 1.5’

Project Description The dashed green line defines the route of the robot. The robot should run through the obstacle course from the start point till the end point. After it hits each obstacle, it backs up and takes a turn in the direction of the route. Project will be judged on smoothness of motion, accuracy of route (turns and final stop are very important), time of travel, and of course a strong robot It is the student responsibility to make sure that the Handy Board is fully charged Each group will have one chance to demonstrate their project to the judges. Therefore, fully test your project before demonstration.

General Flowchart Start Button? Go Straight Sensor hit? Backup Count < 2? Turn Left Backup Turn Right Count=0 Yes No

Bumper Implementation - Touch Sensors Refer to the slides in the documentation file. Is a type of digital sensor: – Return a 0 or a 1 – Switches or bumpers are an example (open: 0, or closed: 1)

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

Sample code To Use Bumpers // Program to make a robot go forward. // If hit detected, go backwards for 4 seconds. void main() { while(start_button()==0){ }; // Waits for use press start button. while(1) { motor (1,80); // Turn on motor 80% of speed. motor (3,80); // Turn on motor 80% of speed. if (digital(13)= =1) // Check sensor connected to port { motor (1, -80); // Turn on motor 3% of speed in opposite direction. motor (3, -80); // Turn on motor 3% of speed in opposite direction. sleep(4.0); off(4); sleep (5.0); }

Project Requirement Making your robot escape from the maze Successfully (90 Points) Optional (10 points for implementing either 1 or 2) 1.Using analog sensors, i.e. sonar or optical range finder, program your robot so that it is able to find its own path out of the maze. 2.Adjusting your robot to make a perfect 90 degree turn with the reference of the black paper strip GOOD LUCK!

Optional Requirement #1 Implementation Example Install your sonar/ranger finder on one side of your robot While the front digital sensor is zero Go forward If the robot is closer to the right wall turn left; Else turn right;

Optional Requirement #2 Implementation Example - Install light sensors on the bottom of your robot While the front digital sensor is zero  Go forward If the robot is closer to the right wall  turn left; Else  start to turn right; If the left ground sensor detects the strip then turn off the left motor until the right ground sensor detects the strip If the right ground sensor detects the strip then turn off the right motor until the left ground sensor detects the strip

while(analog(SENSOR_LB) > TURN_BTH && analog(SENSOR_RB) > TURN_BTH) { printf("\n going straight, looking for the line"); } //Left sensor hit the line first, so stop the left motor if (analog(SENSOR_LB) < TURN_BTH) { off(LEFT_MOTOR); while(analog(SENSOR_RB) > TURN_BTH) { printf("\nCorrecting for turn inaccuracy-Sharp Left"); } MoveStraight(); } else { off(RIGHT_MOTOR); while(analog(SENSOR_LB) > TURN_BTH) { printf("\nCorrectin for turn inaccuracy-Sharp Right"); } MoveStraight(); }