1 ©2006 INSciTE Lab Three Task: Move forward for 2 feet, turn right 90º repeat to complete a square path. End up exactly where you started.

Slides:



Advertisements
Similar presentations
While Loops and If-Else Structures
Advertisements

Repetition everywhere – comparing while in a method and as an event Susan Rodger Duke University July 2010 modified July 2011.
Dublin Robotics Boosters NXT-Step Programming Workshop.
Jason Howard. Agenda I. How to download robotc II. What is tele-op used for? III. How to build a basic tele-op program IV. Getting the robot to drive.
Automation and Robotics
VEX and Robot C Chris Patterson Presented by Modified by J. Andazola.
By Droids Robotics Good Coding Practices: Start with Pseudocode BEGINNER EV3 PROGRAMMING LESSON © 2015 EV3Lessons.com, Last edit 4/1/
If Statements Sections 1.25, Control Structures o All code thus far executes every line of code sequentially o We want to be able to repeat,
Introduction to Sensors
1 ©2006 INSciTE Lab Two Task: Make the program from Lab One (Move forward 5 rotations and turn right 90 degrees) into a MyBlock.
Testbed: Exercises.
Loops and Switches. 1. What kind of blocks are these? 2. Name two kinds of controls that can be specified to determine how long a loop repeats. 3. Give.
GIRLS Robotic Camp. Let’s Begin Meet and Greet – Camp leaders introduce themselves – Students introduce themselves.
Programming 101 The Common Palette Content provided by Connor Statham (6 th Grade Student) Formatting by Shannon Sieber.
Looping forever Reading/observing sensors (inputs) Reacting to sensors Obstacle sensors.
This block is a : displaydisplay looploop movemove soundsound switchswitch waitwait motor.
LabVIEW Basics Review LabVIEW Robotics Fundamentals.
Using Waits, Loops and Switches WAIT please!. Waits, Loops and Switches Pre-Quiz 1. In programming, what is a loop? When is a loop useful? 2. How can.
EV3 Workshop Oct 3, 2015 Instructor: Chris Cartwright
Motors and Sound Troubleshooting Tips. © H-CCS Problem 1 Why can’t I download my program to the RCX?
Barclays Robot Challenge Learn how to Program Robots.
2008 SBPLI/FIRST Programming Workshop Tom Boehm Patchogue Medford High School, Team 329 Motorola Inc. Mark McLeod Hauppauge High School Team 358 Northrop.
Conditions and loops Day 4 Computer Programming through Robotics CPST 410 Summer 2009.
Bunny Eat Broccoli Repetition – Simple loops and Conditional loops Susan Rodger Duke University July 2011.
Robotics NXT-G: variables, file Rotation sensor Lab: Use buttons to hit specific ball. Homework: Postings. Start planning mapping the room.
Lesson 4: Conditional Statements Programming Solutions.
24 Background Building 25 Computing Terminology, and Speed/Velocity Module 4 Notes: Sensing, Or Operator, Conditional Logic 28 Module 4 Algorithms,
Programming 101 The Common Palette Content provided by Connor Statham (9 th Grade Student) Formatting by Shannon Sieber.
1 ©2006 INSciTE Common Blocks. 2 ©2006 INSciTE Common Blocks Common blocks are full featured actions Like English statements Move Wait for an action Display.
Mindstorm NXT-G Introduction Towson University Robotics.
Repetition everywhere – comparing while in a method and as an event Susan Rodger Duke University July 2010.
BEGINNER FLL PROGRAMMING WORKSHOP BY DROIDS ROBOTICS & EV3LESSONS.
VEX and Robot C Chris Patterson Frisco ISD CTE Center Presented by.
Lesson 1: Motors and Sound Programming Solutions.
How to make a Line Follow program Using EV3 software and an NXT light sensor.
Obstacle Detection. In the previous program the robot moves forward and then checks for something in the way. As we observed it only checks for things.
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.
Repetition In today’s lesson we will look at: why you would want to repeat things in a program different ways of repeating things creating loops in Just.
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.
Lego Mindstorm Robots 9797 kit.  Students will learn how to identify how to detect a change in a condition.  Students will learn where and how to identify.
Decision Making: while loops and Boolean Logic. While Loops A while loop is a structure within ROBOTC which allows a section of code to be repeated as.
Sensor Information: while loops and Boolean Logic.
Basic NXT-G Programming. NXT-G Sequence Beams Blocks Structures (special blocks) Wires (connect ports on blocks & structures)
ROBOTC for CORTEX Teacher Training © 2011 Project Lead The Way, Inc. Automation and Robotics VEX.
LEGO Robotics Workshop
Robotics Programming Using Shaft Encoders
Loops and Switches Pre-Quiz
Automation and Robotics
Module F: Presentation Understanding Robot Fundamentals
Displaying sensor values while a robot is running
Sensors and Logic Switches
INTERMEDIATE PROGRAMMING LESSON
INTERMEDIATE PROGRAMMING LESSON
Line Following Behavior
Storing Values as Variables
While Loops and If-Else Structures
While Loops and If-Else Structures
While Loops and If-Else Structures
While Loops and If-Else Structures
RobotC While loop When and how to use the while loop
While Loops and If-Else Structures
Using Waits, Loops and Switches
Loops and Switches How Do You Make Loops and Switches? lesson > TeachEngineering.org Center for Computational Neurobiology, University of Missouri.
Advanced Programming Lesson: Parallel Beams
Obstacle Detection.
While Loops and If-Else Structures
Lego MINDSTORMS EV3.
While Loops And If-Else Structures
Presentation transcript:

1 ©2006 INSciTE Lab Three Task: Move forward for 2 feet, turn right 90º repeat to complete a square path. End up exactly where you started.

2 ©2006 INSciTE Lab 3 An Answer Move forward and turn 4 times to form a square.

3 ©2006 INSciTE Keep it Simple Strategies KISS #3: Variables #4: Parallel Sequences #5: Loops

4 ©2006 INSciTE KISS #4: Parallel Sequences Make two tasks that run independently. (Can you walk and chew gum?) One task lifts the arm. The other task heads for home. Click and drag a sequence beam, release here. Hold cursor here until it changes into a wiring tool.

5 ©2006 INSciTE KISS #5: Loops Loops are a control structure In other programming languages: For … Next Do loop n times Do... Until Do it. Unless some test, do it again. There are loops for Forever Every sensor (including time) Logic Count If your algorithm says something like: “Until the sensor reads x, keep doing this”, use a loop.

6 ©2006 INSciTE Simple Loop Convert this to something simpler using a loop

7 ©2006 INSciTE Combining Structures Outside Loop runs forever. Light Sensor Switch runs inside.

8 ©2006 INSciTE Compare that line follower to this one: Better Simpler. One motor changes speed. Faster. Worse Tight corners? Comparing Algorithms

9 ©2006 INSciTE Watching 3 Sensors Logical ORs combine results into a single True or False Outside Loop (Logical)

10 ©2006 INSciTE Comparing Structures Rework your algorithm to fit the structures. Loop Execute something until an event WaitFor Wait for one event, then continue. Switch Make a choice based on a sensor value at a given point in time. Be careful to make sure you will be watching for the event at the right time

11 ©2006 INSciTE Tricks and Tips Never wait for a sensor to be an exact value, always greater than or less than You could miss the event due to sampling rate For example, wait until rotation greater than 64 not equal to 64.

12 ©2006 INSciTE Lab Four Task: Move exactly one lap around an oval. (Black 2cm line on white paper)

13 ©2006 INSciTE Lab 4 An Answer Did you start by copying? Why not? Is building a robot like taking a test?