Xtreme Robot Olympiad Programming Basics Dr. Peter Laz Associate Professor Department of Engineering University of Denver.

Slides:



Advertisements
Similar presentations
This workforce solution was funded by a grant awarded under Workforce Innovation in Regional Economic Development (WIRED) as implemented by the U.S. Department.
Advertisements

Calculating mL/hr RATE from DOSAGE ORDERED BCTC Nursing Student Resource Center Renee Felts, RN.
This workforce solution was funded by a grant awarded under Workforce Innovation in Regional Economic Development (WIRED) as implemented by the U.S. Department.
Advanced Fuels Using Recycled Vegetable Oil (RVO) as a Fuel Source in Diesel Engines Jim Bainer Diesel Technology Department M-State/Moorhead.
Getting Green Building Automation. Why is Building Automation a Green Technology? There are programs starting all over the nation that focus on alternative.
SOP Standard Operating Procedure This workforce solution was funded by a grant awarded under the President’s Community-Based Job Training Grants as implemented.
Rice: Cultivation Oryza: 2 cultived/22 wild species Oryza sativa>Asia>Global Oryza glaberrima>W. Africa only
C ALCULATING M L/ HR FROM DOSAGE PER KG. 1 ST STEP First, calculate dose per minute. 3 mcg/kg/min x 95.9 kg = mcg/min.
Advanced Farming Systems (AFS) Greg Peterson Instructor Diesel Equipment Technology MSCTC Moorhead MN.
Jobs in Natural Resources. Oregon State University December 2 nd, 2010.
Animal Rights Organizations  People for ethical treatment of Animals  Stop Huntington Animal Cruelty
What happens when things don’t work out like they were supposed to? Drug Recalls This workforce solution was funded by a grant awarded under the President’s.
Xtreme Robot Olympiad Adventure Racing
Instructions for using this template. Remember this is Jeopardy, so where I have written “Answer” this is the prompt the students will see, and where.
Xtreme Robot Olympiad Programming with Sensors Dr. Peter Laz Associate Professor Department of Engineering University of Denver.
Developed by the Institute for the Application of Geospatial Technology in collaboration with the Rochester Institute of Technology U.S. Department of.
Modified Schedule 1:00-2:00 Lecture: Engineering Fundamentals 2:00-3:00 Final Vehicle Modifications 3:00-3:30 Break 3:30-5:00 Soccer Competition 5:00-6:00.
Chemical Safety BT 202 Biotechnology Techniques II.
Brush up on Math BCTC Nursing Student Resource Center Renee Felts, RN.
3rd Dimension of Product Translation: Industrialization
BT 201 Biotechnology Techniques I
Tissue Healing and Repair. Introduction Bodies protective measures to prevent injury  skin & mucosae  activity of cilia in the respiratory tract  chemical.
CAREER EXPLORATION Marlene Mixa Outreach Coordinator CBJT Grant Project.
W ALL S TREET W EST W ORKSHOP Nov O UTLINE Introduction Sources of Data Stock valuation Cost of Capital.
Physical Science is the study of energy-- The following all have to do with energy: speed momentum force work power atoms and molecules density etc….
Grains of the World Topic: RICE This workforce solution was funded by a grant awarded under the President’s High Growth Job Training Initiative as implemented.
Unit 6 Review Flashcards Unit 6 Review Flashcards ALA: Pre-Algebra Unit 6 Integers.
Subtracting Integers ALA: Pre-Algebra Unit 6 Integers.
HAND FINISHING PROJECT #1 - End ‘A’ Parallel to ‘E’.05mm - Side ‘B’ Parallel to ‘D’.05mm - Side ‘C’ Parallel to opposite side 38 mm.05 mm - End ‘A’ Perpendicular.
Xtreme Robotic Olympiad Peter Laz Associate Professor Department of Engineering University of Denver.
MATERIAL SAFETY DATA SHEETS (MSDS) Heather Wipijewski, CVT This workforce solution was funded by a grant awarded under the President’s Community-Based.
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.
Work Readiness Program Willingness To Learn. Objectives Describe why an employer values an employee who expresses a willingness to learn. Describe why.
Bone Development. Composition of Bone Approximately 33%-Organic  Collagen  Glycosaminoglycans (GAGs)  Contain Chondroitin sulfate  Resilience and.
Instructions for using this template. Remember this is Jeopardy, so where I have written “Answer” this is the prompt the students will see, and where.
Ohio’s Statewide STEM Initiative Sonya Pryor-Jones Metropolitan Cleveland Consortium for STEM Ohio STEM Learning Network-Cleveland Hub.
Cat Forelimb Muscles. Long Head- Triceps brachii m. Lateral Head-Triceps brachii m. Spinous head-Deltoideus m. Acromial Head-Deltoideus Brachiocephalicus.
Xtreme Robot Olympiad The Design Process Dr. Peter Laz Associate Professor Department of Engineering University of Denver.
ELECTROMAGNETISM The marriage of electricity and magnetism.
Work Readiness Program Problem Solving & Decision Making.
Workforce Innovation in Regional Economic Development (WIRED) 1 Dude, Where’s my “Collaborative Workspace?” AN OVERVIEW OF THE WIRED WEST MICHIGAN CWS.
INTERVIEW SKILLS This workforce solution was funded by a grant awarded under the President’s Community-Based Job Training Grants as implemented by the.
Energy What are potential and kinetic energy?. First some review… Write down the definition of energy. Write down the four of the seven types of energy.
Transformation Agenda Peer Learning Summit January 15, 2014 Aligning Stackable Credentials with Careers This workforce solution was funded by a grant awarded.
Dogs Canis familiaris.
Exponent Flashcards ALA: Pre-Algebra Unit 6 Integers.
Work Readiness Program Introduction. Objectives List reasons a person is considered a “Good Employee” List reasons a person is considered a “Good Employee”
MCCWDTA Contextualized Curriculum Regional Meeting Planning for Implementation January 2013.
 Remember this is Jeopardy, so where I have written “Answer” this is the prompt the students will see, and where I have “Question” should be the student’s.
Restriction Mapping of Plasmid DNA. Restriction Maps Restriction enzymes can be used to construct maps of plasmid DNA Restriction enzymes can be used.
Welcome to... A Game of X’s and O’s This workforce solution was funded by a grant awarded under the President’s Community-Based Job Training Grants as.
An Introduction to Composites Technology Explore the exciting new technology and opportunities in the world of composites.
GOAL Target PLANNING –---Aim to hit the Target Preparer and Presenter: Margaret Ward “This workforce solution was funded by a grant awarded under.
The Behavior of Proteins: Enzymes, Mechanisms and Control Chapter 7.
Work Readiness Program Planning & Organization. Objectives List tasks to be accomplished prior to and after starting a new job List tasks to be accomplished.
Electricity Mrs. Cromwell-Olson Electric charge b All matter is made of atoms b Atoms are made of protons (+), neutrons, and electrons (-) b Law.
BASIC SKELETAL ANATOMY Heather Wipijewski CVT ALAT This workforce solution was funded by a grant awarded under the President’s Community-Based Job Training.
Work Readiness Program Emotional Intelligence (EI)
Tobacco Mosaic Virus. Disclaimer This workforce solution was funded by a grant awarded under the President’s Community-Based Job Training Grants as implemented.
Amy Kong Mathematics Faculty. Using Google Hangouts to Enhance Online Teaching.
Pumps. DIAPHRAGM PUMPS DIAPHRAGM PUMP DIAGRAM(cont’d)
Unit 7 Review Flashcards Unit 7 Review Flashcards ALA: Pre-Algebra Unit 7 Algebra.
P&ID SYMBOLS.
Rigging & Lifting COMPLETION TECHNICIAN Chain Hoist Chain sling Sling
Module 6 – Sand & Propant COMPLETION TECHNICIAN
Module 5 – Water transfer
PLACEHOLDER FOR YOUR LOGO
PLACEHOLDER FOR YOUR LOGO
Measuring Devices Technology Readiness Training
Presentation transcript:

Xtreme Robot Olympiad Programming Basics Dr. Peter Laz Associate Professor Department of Engineering University of Denver

Outline Basic commands Variables Loops Conditional statements Motor and servo operation PWM signals Programming with EasyC How to program the microcontroller?

Variables Different types of variables int = integer (whole number) float = decimal char = character

Common Commands Operations Sets variables equal to specific values Standard operators: + - * / Loops – cause actions to be repeated for while Conditional statements – actions executed depend on results of comparisons if … then if … then … else Comparators: >, =, <=, ==

Program Tracking VariableValue Printed to the screen Other Actions

Basic Commands Example: if else int x If (x>10) { x=x+5 } else { x=x-1 } What value does x have if x = 5? x = 18? x = 10?

Basic Commands Example: for loop int i for (i=0;i<7;i=i+1) { print(“tiger\n”) } How many times is tiger printed to the screen?

Basic Commands Example: for loop int i for (i=0;i<7;i=i+2) { print(“tiger\n”) } How many times is tiger printed to the screen?

Basic Commands Example: while loop int i int flag i=0; flag = 0 while (flag != 1) { i=i+1 print(i) If (i>=9) { flag = 1 } What is printed to the screen?

Exercise Using basic commands, develop a flow chart/program to print the first 10 numbers of the Fibonacci sequence 1,1,2,3,5,8,13,21,34,55

Motor and Servo Components Motors – operate continuously Servos – have a range of 120 degrees Both use pulse width modulated signals PWM values range from 0 to 255 Corresponds to the duty cycle or amount of time the pulse is on 0 = full counterclockwise 127 = stop 255 = full clockwise

PWM Signals Repeating pulse signal Pulse width determines the amount of voltage to the motor 127 or 50% duty cycle corresponds to 1.5ms

Motor Control Note: to make the robot go forward Left motor CW Right motor CCW

Basic Commands Define variables Type of and initial value of variable Assignment Assign a value to a variable Wait(time in ms) wait(500) 1000 ms = 1 sec This applies a delay to allow the vehicle to move forward or turn Sensors Read in data into a variable Commands vary depending on the sensor

Programming Lab with EasyC

Programming 1.Determine the appropriate com port Right click on my computer, properties, hardware, device manager Look at which com port has “Prolific USB to Serial Comm port” 2.Open easyC 3.Under Build&Download, choose loader setup Pick the correct com port

Programming 4.With the vehicle off, plug the programming module into the microcontroller. 5.Turn the vehicle on, be aware the robot will begin to run the previously loaded program 6.Hit the orange button on the programming cable to connect the vehicle and the computer 7.Initiate programming through the build and download menu

EasyC

Exercises Download Testprogram.ecp Download Online Window

Exercises Write a program to drive in a 5 foot square Challenge: use a for loop in your code 1. Draw the flowchart 2. Write the program 3. Test the wait() values

This workforce solution was funded by a grant awarded under the Workforce Innovation in Regional Development (WIRED) as implemented by the U.S. Department of Labor’s Employment and Training Administration working in partnership with the Colorado Department of Labor and Employment, the Metro Denver Economic Development Corporation, and the City and County of Denver's Office of Economic Development. The solution was created by the grantee and does not necessarily reflect the official position of the U.S. Department of Labor. The Department of Labor makes no guarantees, warranties, or assurances of any kind, express or implied, with respect to such information, including any information on linked sites and including, but not limited to, accuracy of the information or its completeness, timeliness, usefulness, adequacy, continued availability, or ownership. This solution is copyrighted by the institution that created it. Internal use by an organization and/or personal use by an individual for non-commercial purposes is permissible. All other uses require the prior authorization of the copyright owner.