Parallel Beam Synchronization

Slides:



Advertisements
Similar presentations
BEGINNER EV3 PROGRAMMING LESSON By: Droids Robotics Topics Covered: Turning.
Advertisements

Squaring or Aligning on a Line
BEGINNER EV3 PROGRAMMING Lesson
BEGINNER EV3 PROGRAMMING Lesson
By Lego Works NXT Light Sensors on the EV3 ADVANCED EV3 PROGRAMMING LESSON © 2015 EV3Lessons.com, Last edit 1/29/
BEGINNER EV3 PROGRAMMING Lesson
Parallel Beams INTERMEDIATE EV3 PROGRAMMING LESSON By Droids Robotics
BEGINNER EV3 PROGRAMMING LESSON By: Droids Robotics Topics Covered: Display Block.
By Droids Robotics Infrared Sensor Intermediate EV3 PROGRAMMING LESSON © 2015 EV3Lessons.com, Last edit 5/26/
Menu System ADVANCED EV3 PROGRAMMING LESSON By Droids Robotics
INTERMEDIATE PROGRAMMING LESSON By: Droids Robotics Turn Degrees My Block.
By Droids Robotics Code contributed by The Construction Mavericks
Using the Gyro Sensor and Dealing with Drift
BEGINNER PROGRAMMING Lesson
BEGINNER EV3 PROGRAMMING Lesson
By Mesa Robles Robotworks and Droids Robotics
BEGINNER EV3 PROGRAMMING Lesson
INTERMEDIATE PROGRAMMING LESSON By: Droids Robotics Color Line Follower My Blocks with Inputs: Move Until Black © 2014, Droids Robotics, v. 2.0, Last edit.
INTERMEDIATE PROGRAMMING LESSON By: Droids Robotics My Blocks Overview Step-by-Step Visual Guide to Creating a My Block with Inputs with Outputs.
ADVANCED EV3 PROGRAMMING LESSON
Gyro Turns ADVANCED EV3 PROGRAMMING LESSON By Droids Robotics
BEGINNER EV3 PROGRAMMING LESSON By: Droids Robotics Topics Covered: Switches.
INTERMEDIATE PROGRAMMING LESSON By: Droids Robotics Move Distance My Block (Move_Inches)
Calibrating Color Sensors
Alternative Squaring on a Line
BEGINNER EV3 PROGRAMMING LESSON By: Droids Robotics Topics Covered: EV3 Basics Introduction to the EV3 Brick and Software.
BEGINNER EV3 PROGRAMMING Lesson
By Droids Robotics Line Followers: Basic to Proportional ADVANCED EV3 PROGRAMMING LESSON © 2015 EV3Lessons.com, Last edit 4/5/
 By Droids Robotics Code Contributed by FLL 1920 Line Following with Two Color Sensors and Proportional Control ADVANCED EV3 PROGRAMMING LESSON © 2015.
INTERMEDIATE PROGRAMMING Lesson
ADVANCED EV3 PROGRAMMING LESSON By Droids Robotics 1 Data Logging (Part 2)
By Droids Robotics INTERMEDIATE PROGRAMMIN G LESSON MOVE DISTANCE MY BLOCK (MOVE_CM)
BEGINNER EV3 PROGRAMMING Lesson
By Droids Robotics INTERMEDIATE EV3 PROGRAMMING LESSON SIMPLE & OPTIMIZED ULTRASONIC WALL FOLLOW.
BEGINNER EV3 PROGRAMMING LESSON By: Droids Robotics Using Sensor Data and Port View.
By Droids Robotics INTERMEDIATE PROGRAMMIN G LESSON DATA WIRES.
By Droids Robotics INTERMEDIATE PROGRAMMING LESSON BRICK BUTTONS AS SENSORS.
ADVANCED EV3 PROGRAMMING LESSON By Droids Robotics PROPORTIONAL ULTRASONIC WALL FOLLOWER © 2015, EV3Lessons.com, Last edit 11/17/2015.
BEGINNER EV3 PROGRAMMING LESSON By: Droids Robotics Topics Covered: Touch Sensor.
By Droids Robotics INTERMEDIATE PROGRAMMIN G LESSON COLOR LINE FOLLOWER MY BLOCK WITH INPUTS: MOVE FOR DISTANCE.
ADVANCED EV3 PROGRAMMING LESSON By Droids Robotics © 2015, EV3Lessons.com (last edit 4/9/2015) Stall Detection with code from Hoosier Girlz.
INTERMEDIATE PROGRAMMING Lesson
INTERMEDIATE PROGRAMMING LESSON
By Sanjay and Arvind Seshan
Squaring or Aligning on a Line
BEGINNER EV3 PROGRAMMING Lesson
Parallel Beam Synchronization
By Sanjay and Arvind Seshan
BEGINNER PROGRAMMING LESSON
By Sanjay and Arvind Seshan
Gyro Turns © 2015 EV3Lessons.com, Last edit 12/19/2015.
INTERMEDIATE PROGRAMMING LESSON
Parallel Beam Synchronization
INTERMEDIATE PROGRAMMING LESSON
INTERMEDIATE PROGRAMMING LESSON
INTERMEDIATE PROGRAMMING LESSON
By Sanjay and Arvind Seshan
Gyro Move Straight & Gyro Wall Follow
Lesson 4: Aligning on Lines On The Mat
INTERMEDIATE PROGRAMMING LESSON
BEGINNER PROGRAMMING LESSON
INTERMEDIATE PROGRAMMING LESSON
INTERMEDIATE PROGRAMMING LESSON
By Sanjay and Arvind Seshan
Repeating Actions (Loops)
BEGINNER PROGRAMMING LESSONS
INTERMEDIATE PROGRAMMING LESSON
BEGINNER PROGRAMMING LESSONS
BEGINNER EV3 PROGRAMMING Lesson
BEGINNER EV3 PROGRAMMING Lesson
Presentation transcript:

Parallel Beam Synchronization ADVANCED EV3 PROGRAMMING LESSON Parallel Beam Synchronization By Droids Robotics © 2015 EV3Lessons.com, Last edit 4/9/2015

Lesson Objectives Understand what the “synch problem” is when you use parallel beams Learn techniques to to ensure that two beams end before moving to the next block of code (variables, data wires, loops and My Blocks) Prerequisites: Parallel Beams Lesson, Data Wires, Variables, My Blocks with Inputs and Outputs © 2015 EV3Lessons.com, Last edit 4/9/2015

Using Parallel Beams Inside Programs Parallel beams are great for doing two things at the same time Often want to do something after you complete the Parallel Beam Hard to tell which beam will finish first (called the “synch problem”) Need to synchronize the beams to make sure that blocks execute when you expect them to In the picture below, will the turn start after motor A is done or before? Answer: You do not know © 2015 EV3Lessons.com, Last edit 4/9/2015

Ensure That Both Beams Finished In this example, we want both the 720 degree move steering (the move) and the motor A move to finish before the 360 degree move steering (the turn) There are several ways to do this: Variables (see slide 4) Wires (see slide 5) Loops (see slide 6) My blocks (see slide 7) This is labeled as “synch problem” in the corresponding EV3 code file © 2015 EV3Lessons.com, Last edit 4/9/2015

Use Variables To Synchronize This is labeled as “variables” in the corresponding EV3 code file © 2015 EV3Lessons.com, Last edit 4/9/2015

Use Wires to Synchronize This is labeled as “wires” in the corresponding EV3 code file © 2015 EV3Lessons.com, Last edit 4/9/2015

Use Loops to Synchronize This is labeled as “loops” in the corresponding EV3 code file © 2015 EV3Lessons.com, Last edit 4/9/2015

Use My Blocks to Synchronize This is labeled as “My Blocks” in the corresponding EV3 code file This is labeled as “Parallel_Beam_My_Blocks” in the corresponding EV3 code file Inside the My Block © 2015 EV3Lessons.com, Last edit 4/9/2015

Challenge: Squaring on a Line Synchronization is critical for aligning on a line using parallel beams As a challenge, complete the Squaring on Line lesson. Note: You must ensure that both beams in an align are completed before moving onto the next block Otherwise, the robot will not be straight on a line This example is from the Squaring on a Line Lesson © 2015 EV3Lessons.com, Last edit 4/9/2015

Discussion Guide What is the “sync problem”? Ans. When you write code with parallel beams, you are not certain when the two beams will complete. You don’t know if one beam might finish before the other. What are 4 ways to solve this problem? Ans. Use variables, data wires, loops or My Blocks to make sure that the parallel beams compete before moving on to the next block of code. © 2015 EV3Lessons.com, Last edit 4/9/2015

Credits This tutorial was created by Sanjay Seshan and Arvind Seshan from Droids Robotics (team@droidsrobotics.org). Original Gyro Turn code was provided by the Construction Mavericks (frank.levine@gmail.com) More lessons at www.ev3lessons.com                           This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. © 2015 EV3Lessons.com, Last edit 4/9/2015