Engineering H192 - Computer Programming Gateway Engineering Education Coalition Lab 7P. 1Winter Quarter Stop Light Lab 7.

Slides:



Advertisements
Similar presentations
Circuits, motors, and your lab. After friction…now what? 9QBJnR8k 9QBJnR8k.
Advertisements

MICROCONTROLLERS MODULE 2 Programming, Controlling and Monitoring.
1 Boe-Bot Parts BOE-BOT Lecture #1b DE - Digital Electronics.
Robot C Ready, SET, Go! Workshop SDSU, Fall 2013.
RaceBot can do car race using two DC motors. Let's learn how to go forward, backward, right turn, and left turn. with practicing ' ㄱ ' shape racing, and.
EIGHTH GRADE ROBOTICS KITTATINNY REGIONAL HIGH SCHOOL MR. SHEA Introduction to Programming
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 29P. 1Winter Quarter Software Design Project.
Engineering H193 - Team Project Gateway Engineering Education Coalition P. 1 Spring Quarter 2008 Robot Programming Tips Week 4 Day 2 By Matt Gates and.
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition P. 1Winter Quarter Daily Assignment A21 A21 asks.
Software Design Project
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 6P. 1Winter Quarter I/O in C Lecture 6.
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 26P. 1Winter Quarter Handy Board Lecture.
Engineering H193 - Team Project Gateway Engineering Education Coalition P. 1 Spring Quarter Week 6 Day 2 Lecture on and Examples of Electrical Circuits.
Engineering H192 - Computer Programming Gateway Engineering Education Coalition Lab 4P. 1Winter Quarter Analog Electronics Lab 4.
ARDUINO PROGRAMMING Working with the Arduino microcontroller.
Testbed: Exercises.
ELEC 1041 Digital Electronics Tutorial: Word Problems
Engineering H192 - Computer Programming Gateway Engineering Education Coalition Lab 2P. 1Winter Quarter Digital Electronics Lab 2.
Flowol subroutines Subroutines are used to:  Simplify your code to make it easier to read (or for someone.
Creative Inventions and Robotics Programming with Robolab By Rebekah Gendron.
Introduction to Interfacing Projects Nareen Khan.
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lab 3P. 1Winter Quarter Analog Electronics Lab.
The George Washington University Electrical & Computer Engineering Department ECE 002 Dr. S. Ahmadi Class 2.
Lego Robot Construction Project. Adam, Roger, Lu, Riana, Paul.
Software Programmed in C 1. lightCycle: Function that cycles the lights when the CapSense is activated, cycles lights from Red to Green. 2. If, else: Determines.
Controlling the Outside World
Robot Building Lab: Introduction Lab 1 The Handy Board and Interactive-C (IC) es/robotlab/labs/lab1.ps.
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.
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.
Default_Routine(); - PWM Mapping /******************************************************************** * FUNCTION NAME: Default_Routine * PURPOSE: Performs.
Engineering 1040: Mechanisms & Electric Circuits Winter 2015 Interfacing Light-Emitting Diodes (LEDs) & Push Buttons to Microcontrollers.
Overview of Project 5 Slides are available at : Project will be checked off in class
Semiconductors, ICs and Digital Fundamentals. The Diode The semiconductor phenomena. Diode performance with ac and dc currents. Diode types: –General.
The Handy Board Bryan Valentini General Robotics 2003.
Engineering H192 - Computer Programming Gateway Engineering Education Coalition Lect 26P. 1Winter Quarter Handy Board Lecture 26.
Engineering H193 - Team Project Gateway Engineering Education Coalition Lab 1P. 1Spring Quarter Introduction to Sensors Lab 1.
Engineering H192 - Computer Programming Gateway Engineering Education Coalition Lect 29P. 1Winter Quarter Software Design Project Lecture 29.
Lesson 4: Conditional Statements Programming Solutions.
 In computer programming, a loop is a sequence of instruction s that is continually repeated until a certain condition is reached.  PHP Loops :  In.
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.
Oregon Robotics Tournament and Outreach Program RCX Basics.
A stop sign is a traffic sign that stands for coming to a complete stop at an intersection or end of the road.
BEGINNER FLL PROGRAMMING WORKSHOP BY DROIDS ROBOTICS & EV3LESSONS.
Lesson 1: Motors and Sound Programming Solutions.
traffic lights red lightyellow lightgreen light.
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.
Programming Basics - RobotC Introduction to Robotics.
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Intro to the Robotics Introducing the IC Discuss.
The Simulation of Traffic Patterns and Optimizing Traffic Lights
COMP211 Computer Logic Design Introduction to the DE2 Board
Stop Light Lab 7 Winter Quarter.
Programming Scratch to Control a K’NEX Fairground Ride
ELEC 1041 Digital Electronics Tutorial: Word Problems
Programming - Motion Intro to Robotics.
Raspberry Pi: External Inputs & Outputs
Analysis of Synchronous Sequential Circuits
DC motor.
Programming Basics - RobotC
Analysis of Synchronous Sequential Circuits
Lesson 3: Sensor Wait-for’s Programming Solutions
Red lights, yellow lights, and green lights
Lab 1. Introduction to the DE2 Board
East West Move to Table 2 N/S
1 2 Table No Table No 5 Table 5 Table ¾ Howell Movement
© A+ Computer Science -
Arduino Uno circuit basics
Oregon Robotics Tournament and Outreach Program
Presentation transcript:

Engineering H192 - Computer Programming Gateway Engineering Education Coalition Lab 7P. 1Winter Quarter Stop Light Lab 7

Engineering H192 - Computer Programming Gateway Engineering Education Coalition Lab 7P. 2Winter Quarter What We Will Learn Real-time programming techniques Re-introduction to Interactive C and the Handy Board Simple motor port functions for traffic light control

Engineering H192 - Computer Programming Gateway Engineering Education Coalition Lab 7P. 3Winter Quarter Problem Statement Make the Handy Board control the stoplight at a intersection of two roads, one running North and South (NS), the other East and West (EW). The stoplight should be operated by Motor Ports 1-3 and should follow normal operation…meaning exactly one light (either EW or NS) should be red at any time. Follow this standard pattern: –Red – 6 seconds –Green – 4 seconds –Yellow – 2 seconds

Engineering H192 - Computer Programming Gateway Engineering Education Coalition Lab 7P. 4Winter Quarter Things to Know Positive polarity from the motor port will control NS light Negative polarity from the motor port will control EW light 1 st and 3 rd pin of motor port are the connection points, the middle one should have no connection

Engineering H192 - Computer Programming Gateway Engineering Education Coalition Lab 7P. 5Winter Quarter The Handy Board

Engineering H192 - Computer Programming Gateway Engineering Education Coalition Lab 7P. 6Winter Quarter Stoplight Circuit Forward Biased Reverse Biased motor (0, 100);

Engineering H192 - Computer Programming Gateway Engineering Education Coalition Lab 7P. 7Winter Quarter Stoplight Circuit Forward Biased Reverse Biased motor (0, -100);

Engineering H192 - Computer Programming Gateway Engineering Education Coalition Lab 7P. 8Winter Quarter Some Tips on How To Modify Your Code Modify functions to use Handy Board "motor" function in addition to or in place of "printf" Remember that if you use "printf", the display screen is only 32 characters long Remove any #include statements Move function bodies from below main ( ) to above main ( )

Engineering H192 - Computer Programming Gateway Engineering Education Coalition Lab 7P. 9Winter Quarter Some More Tips on How To Modify Your Code Replace any "do…while" loops with "while" loops Replace use of UNIX "time" function with use of Handy Board "seconds" function for computing elapsed time Remember that Handy Board "sleep" function requires a floating point parameter

Engineering H192 - Computer Programming Gateway Engineering Education Coalition Lab 7P. 10Winter Quarter Examples of Useful IC Functions Pause for two seconds –sleep (2.0) ; Turn motor port 1 on full power –motor (1, 100) ; Turn motor port 1 off –motor (1, 0) ; Wait for the "start" button –while (!start_button ( ) ) ;