 By Droids Robotics Code Contributed by FLL 1920 Line Following with Two Color Sensors and Proportional Control ADVANCED EV3 PROGRAMMING LESSON © 2015.

Slides:



Advertisements
Similar presentations
Squaring or Aligning on a Line
Advertisements

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
Parallel Beam Synchronization
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.
Gyro Turns ADVANCED EV3 PROGRAMMING LESSON By Droids Robotics
BEGINNER EV3 PROGRAMMING LESSON By: Droids Robotics Topics Covered: Switches.
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/
ADVANCED EV3 PROGRAMMING LESSON By Droids Robotics 1 Data Logging (Part 2)
BEGINNER EV3 PROGRAMMING Lesson
By Droids Robotics INTERMEDIATE EV3 PROGRAMMING LESSON SIMPLE & OPTIMIZED ULTRASONIC WALL FOLLOW.
By Droids Robotics INTERMEDIATE PROGRAMMIN G LESSON DATA WIRES.
By Droids Robotics INTERMEDIATE PROGRAMMING LESSON BRICK BUTTONS AS SENSORS.
Bonus EV3 Programming Lessons By Droids Robotics PixyCam for MINDSTORMS Color Identifinder.
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
By Sanjay and Arvind Seshan
Squaring or Aligning on a Line
By Sanjay and Arvind Seshan
Proportional Control with the Sound Sensor
SIMPLE & OPTIMIZED ULTRASONIC WALL FOLLOW
INTERMEDIATE PROGRAMMING LESSON
INTERMEDIATE PROGRAMMING LESSON
Beginner Programming Lesson
BEGINNER PROGRAMMING Lesson
SIMPLE & OPTIMIZED ULTRASONIC WALL FOLLOW
INTERMEDIATE PROGRAMMING LESSON
INTERMEDIATE PROGRAMMING LESSON
INTERMEDIATE PROGRAMMING LESSON
Gyro Move Straight & Gyro Wall Follow
Lesson 4: Aligning on Lines On The Mat
Beginner Programming Lesson
INTERMEDIATE PROGRAMMING LESSON
Lesson 8: line following
BEGINNER EV3 PROGRAMMING Lesson
By Sanjay and Arvind Seshan
Beginner Programming Lesson
By Sanjay and Arvind Seshan
Line Followers: Basic to Proportional
BEGINNER PROGRAMMING Lesson
Proportional Control with the Sound Sensor
Line Followers: Basic to Proportional
INTERMEDIATE PROGRAMMING LESSON
INTERMEDIATE PROGRAMMING LESSON
By Sanjay and Arvind Seshan
By Sanjay and Arvind Seshan
BEGINNER EV3 PROGRAMMING Lesson
INTERMEDIATE PROGRAMMING LESSON
BEGINNER EV3 PROGRAMMING Lesson
Proportional Line Follower
Presentation transcript:

 By Droids Robotics Code Contributed by FLL 1920 Line Following with Two Color Sensors and Proportional Control ADVANCED EV3 PROGRAMMING LESSON © 2015 EV3Lessons.com, Last edit 9/7/2015 1

Objectives  Learn how to write a line follower that uses two color sensors  Learn how to write a two color line follower that uses proportional control  Pre-requisites: Basic Line Following, Switches, Loops, Proportional Control © 2015 EV3Lessons.com, Last edit 9/7/2015 2

A Basic One Sensor Line Follower  Robot sees white, turn left  Robot sees black, turn right © 2015 EV3Lessons.com, Last edit 9/7/2015 3

What is a Two Color Line Follower? The goal is to use two light sensors next to each other to follow a line The light sensors need to be placed approximately the line’s width apart When following the line they should both sensors should be reading the edge of the line Watch video to see line straddling in action © 2015 EV3Lessons.com, Last edit 9/7/2015 4

Tips for success  Placement of the two color sensors are very important  In the picture on the right, we have a beam placed so you can see how far apart to place your sensors. © 2015 EV3Lessons.com, Last edit 9/7/2015 5

Two Color Sensor Line Follower © 2015 EV3Lessons.com, Last edit 9/7/ Sensor 1 on White Sensor 2 on White Go forward Sensor 1 on Black Sensor 2 on White Turn left Sensor 1 on White Sensor 2 on Black Turn right

Challenge 1  Use the ideas from Slide 4 and write a line follower that straddles a red line – uses 2 color sensors to line follow a red line? © 2015 EV3Lessons.com, Last edit 9/7/ Sensor 1 on White Sensor 2 on White Go forward Sensor 1 on Red Sensor 2 on White Turn left Sensor 1 on White Sensor 2 on Red Turn right

Challenge 1 Solution © 2015 EV3Lessons.com, Last edit 9/7/2015 8

How do you add proportional control?  What is the target  both sensors should read the same value  What is the error  the difference between the sensors  What is the correction  turn more sharply if the difference is large © 2015 EV3Lessons.com, Last edit 9/7/ Sensor 1 reading 50 Sensor 2 reading 50 Go forward Sensor 1 reading 10 Sensor 2 reading 100 Turn Left sharply Sensor 1 reading 60 Sensor 2 reading 40 Turn right slightly

Challenge 2 Solution © 2015 EV3Lessons.com, Last edit 9/7/

Watch this code in action on YouTube  EV3Lessons.com YouTube Channel  © 2015 EV3Lessons.com, Last edit 9/7/

Credits  This lesson was written by Sanjay and Arvind Seshan from Droids Robotics  FLL Team 1920, Baker’s Dozen contributed code, video and photos for making the basic two color line follower (line straddle)  More lessons are available at © 2015 EV3Lessons.com, Last edit 9/7/ This work is licensed under a Creative Commons Attribution- NonCommercial-ShareAlike 4.0 International License.Creative Commons Attribution- NonCommercial-ShareAlike 4.0 International License