BEGINNER PROGRAMMING LESSON

Similar documents
BEGINNER PROGRAMMING LESSON

TABLET LESSONS BASIC LINE FOLLOWER. By Sanjay and Arvind Seshan

Squaring or Aligning on a Line

INTERMEDIATE PROGRAMMING LESSON

Squaring or Aligning on a Line

ADVANCED EV3 PROGRAMMING LESSON. Proportional Control. By Sanjay and Arvind Seshan

Line Followers: Basic to Proportional

BUILDING A COMPETITION ROBOT SESHAN BROTHERS

Robotics using Lego Mindstorms EV3 (Intermediate)

SINGLE SENSOR LINE FOLLOWER

LEGO MINDSTORMS COMPETITIONS

Robotic Programming. Skills Checklist

Line Detection. Duration Minutes. Di culty Intermediate. Learning Objectives Students will:

Erik Von Burg Mesa Public Schools Gifted and Talented Program Johnson Elementary School

EV3 Advanced Topics for FLL

Pre-Activity Quiz. 2 feet forward in a straight line? 1. What is a design challenge? 2. How do you program a robot to move

Program Your Robot to Perform a Task

e d u c a t i o n Detect Dark Line Objectives Connect Teacher s Notes

Where C= circumference, π = 3.14, and D = diameter EV3 Distance. Developed by Joanna M. Skluzacek Wisconsin 4-H 2016 Page 1

Ev3 Robotics Programming 101

Robotics Workshop. for Parents and Teachers. September 27, 2014 Wichita State University College of Engineering. Karen Reynolds

LEGO Mindstorms Class: Lesson 1

Automatic Headlights

Hare and Snail Challenges READY, GO!

Curriculum Activities for Driving Course Curriculum Sample 1

Welcome to. NXT Basics. Presenter: Wael Hajj Ali With assistance of: Ammar Shehadeh - Souhaib Alzanki - Samer Abuthaher

understanding sensors

2.4 Sensorized robots

Pre-Day Questionnaire

Nebraska 4-H Robotics and GPS/GIS and SPIRIT Robotics Projects

An Introduction to Programming using the NXT Robot:

Robot Programming Manual

Deriving Consistency from LEGOs

Robot Olympics: Programming Robots to Perform Tasks in the Real World

Inspiring Creative Fun Ysbrydoledig Creadigol Hwyl. LEGO Bowling Workbook

How Do You Make a Program Wait?

Introduction to Robotics Rubrics

A - Debris on the Track

A - Debris on the Track

Line-Follower Challenge

After Performance Report Of the Robot

Parts of a Lego RCX Robot

Chassis & Attachments 101. Part 1: Chassis Overview

Inspiring the Next Engineers and Scientists

Pre-Activity Quiz. building a robot to fight another robot by trying to push it out of a ring? in the competition? the way when racing?

RoboCup Sumo Workshop. Margaux Edwards July 2018

S B Patil Public School, Pune

Sample Pages. Classroom Activities for the Busy Teacher: NXT. 2 nd Edition. Classroom Activities for the Busy Teacher: NXT -

Illustrative Mathematics. Alignments to Content Standards: 4.OA.B. Task. Below is a multiplication table for single digit numbers:

Robotics 2a. What Have We Got to Work With?

Lego Nxt in Physical Etoys

The power of Math in LEGO Robotics

Lesson 16: Relating Scale Drawings to Ratios and Rates

acknowledgments...xv introduction...xvii 1 LEGO MINDSTORMS NXT 2.0: people, pieces, and potential getting started with the NXT 2.0 set...

The light sensor, rotation sensor, and motors may all be monitored using the view function on the RCX.

Flowcharts and Programs

Week Lesson Assignment SD Technology Standards. SPA Handout. Handouts. Handouts/quiz. Video/handout. Handout. Video, handout.

Worksheet Answer Key: Tree Measurer Projects > Tree Measurer

LAB 5: Mobile robots -- Modeling, control and tracking

The Nomenclature and Geometry of LEGO

Unit 4: Robot Chassis Construction

EQ-ROBO Programming : bomb Remover Robot

Revision for Grade 7 in Unit #1&3

Some prior experience with building programs in Scratch is assumed. You can find some introductory materials here:

A Day in the Life CTE Enrichment Grades 3-5 mblock Programs Using the Sensors

Building Robots With Lego Mindstorms Nxt

Chassis & Attachments 101. Chassis Overview

LEGO BASED CHALLENGE. 1. Material

Instructors. Manual GEARED. After-School Robotics Program By Haley Hanson

Lesson 5: Identifying Proportional and Non-Proportional Relationships in Graphs

Sensing the World Around Us. Exploring Foundational Biology Concepts through Robotics & Programming

4-H Mindstorm EV3 Robotics Camp Mills County 4 Day Camp Day 1, Tuesday AGENDA

Mindstorms NXT. mindstorms.lego.com

Fabricate a Coat Hook

Lesson 5: Identifying Proportional and Non-Proportional Relationships in Graphs

COSC343: Artificial Intelligence

Haunted House. If you drive completely off the black paper or visit a room out of order, your turn is over. Back groun d. Back groun d B A C K G R

Engineering with EV3 Workshop

1.NBT Number Square. Task. Alignments to Content Standards: 1.NBT.C.5. Part 1. The teacher explains the Number Square:

Lab book. Exploring Robotics (CORC3303)

LS Creative Learnings Pvt Ltd. STEM-Robotics Education. Report for Sep S.B. Patil Public School, Pune

Basic NXT-G Programming

Studuino Icon Programming Environment Guide

E Technology: A. Innovations Activity: Introduction to Robotics

2018 First Responders 4-H Robotics Challenge Page 1

Mechatronics Engineering and Automation Faculty of Engineering, Ain Shams University MCT-151, Spring 2015 Lab-4: Electric Actuators

Utah Elementary Robotics Obstacle Course Rules USU Physics Day. Competition at USU Brigham City Campus 989 S Main St Brigham City, UT 84302

A - Debris on the Track

Unit 11. Vocabulary Card Images. Skills Strand Grade 3. Core Knowledge Language Arts

HOLY ANGEL UNIVERSITY COLLEGE OF INFORMATION AND COMMUNICATIONS TECHNOLOGY ROBOT MODELING AND PROGRAMMING COURSE SYLLABUS

2015 Maryland State 4-H LEGO Robotic Challenge

LEGO Mindstorms EV3 Robotics Instructor Guide. Joanna M. Skluzacek, PhD. Associate Professor. Department of Youth Development

ME375 Lab Project. Bradley Boane & Jeremy Bourque April 25, 2018

Arduino STEAM Academy Arduino STEM Academy Art without Engineering is dreaming. Engineering without Art is calculating. - Steven K.

App Inventor meets NXT

Part of: Inquiry Science with Dartmouth

Basic NXT-G Programming

Lesson plan. A 3d View from a Drone: Make a 3d model from your photos

UNIT1. Keywords page 13-14

A Day in the Life CTE Enrichment Grades 3-5 mblock Robotics - Simple Programs

Transcription:

Basic Line Follower (NXT) By Sanjay and Arvind Seshan BEGINNER PROGRAMMING LESSON

LESSON OBJECTIVES 1. Learn how humans and robots follow lines 2. Learn how to get a robot to follow a line using the NXT Color Sensor 3. Learn how to get a robot to follow a line using the NXT Light Sensor 4. Learn how to follow a line until a sensor is activated 5. Learn how to follow a line for a particular distance 6. Learn how to combine sensors, loops and switches 2016 EV3Lessons.com (Last edit: 7/04/2016) 2

FOLLOW THE MIDDLE? Humans want to follow the line in the middle. Let s have the robot do the same thing using the Color Sensor What type of questions can we ask using this sensor Are you on line or not? 2016 EV3Lessons.com (Last edit: 7/04/2016) 3

1. If we are on black, keep going straight 2. If we are on white, turn left to get back to the line Seems to work fine here 2016 EV3Lessons.com (Last edit: 7/04/2016) 4

1. If we are on black, keep going straight 2. If we are on white, turn left to get back to the line OH NO my robot is running away. When the robot leaves the left side of the line, the program no longer works! 2016 EV3Lessons.com (Last edit: 7/04/2016) 5

LINE FOLLOWING: ROBOT STYLE Why could the Human follow the middle?: They can see ahead. They can see the whole line and its surroundings They see both sides and which side they left Why can t the Robot do the same thing?: Can t tell right or left side of the line How do we make sure the robot always veers off on the SAME SIDE of the line? Instead of the middle, could the robot follow the edge? So now the robot will fall off only the same side. We will now show you how this works! 2016 EV3Lessons.com (Last edit: 7/04/2016) 6

ROBOT LINE FOLLOWING HAPPENS ON THE EDGES Left side line following Right side line following If on black, turn left. If on white turn right. The robot has to choose which way to turn when the color sensor sees a different color. The answer depends on what side of the line you are following! If on black, turn right. If on white turn left. 2016 EV3Lessons.com (Last edit: 7/04/2016) 7

STARTING THE ROBOT ON THE CORRECT SIDE 2016 EV3Lessons.com (Last edit: 7/04/2016) 8

INSTRUCTOR NOTES WHEN USING AN NXT We used CyberBot (see EV3Lessons.com Robot Design page) CyberBot has color sensors behind the wheel Therefore, students will have to line follow backwards (negative power) Programming a line follower on an NXT brick with an EV3 requires some adjustments We found that Move Steering with an angle does not work with the NXT for pivot turns Therefore, the code uses Large Motor blocks instead for turning 9

LINE FOLLOWER CHALLENGE 1 Step 1: Write a program that follows the RIGHT edge of a line. 1. If your sensor sees black, turn right 2. If your sensor sees white, turn left 3. Use loops and switches! 4. You will need to use Large Motor block in ON Mode. 5. You will need to control each motor (B and C) separately. Step 2: Try it out on different lines. B C B C 10

LINE FOLLOWING CHALLENGE SOLUTION Q. Does this program follow the Right or Left side of a line? A. The robot is following the Right Side of the line. 11

CHALLENGE 1 SOLUTION Q. This line follower goes forever. How do we make this stop? A. Change the end condition on the loop. 12

LINE FOLLOWER CHALLENGE 2 Part 1: Make a line follower that stops when you press the touch sensor Part 2: Make a line follower that stops after it travels a particular distance 2016 EV3Lessons.com (Last edit: 7/04/2016) 13

CHALLENGE 2 SOLUTION: SENSOR 14

CHALLENGE 2 SOLUTION: PARTICULAR DISTANCE 15

LINE FOLLOWER CHALLENGE 3 Make a line follower that uses the NXT Light Sensor to follow the line. Note: You have to use the Sound Block. (Refer to the lesson on using NXT Light sensors on EV3Lessons.com if you need help with this.) 2016 EV3Lessons.com (Last edit: 7/04/2016) 16

LINE FOLLOWER CHALLENGE 3 The program below shows an example of a line-follower that works with a light sensor pretending to be a sound sensor. For much more discussion on linefollowing, see the light-follower tutorials at EV3lessons.com. Challenge solution provided by Cathy Sarisky 2016 EV3Lessons.com (Last edit: 7/04/2016) 17

DISCUSSION GUIDE Why is it important for the robot to follow the same side of the line? The robot only knows to check if it is on or off the line. This is a basic line follower. What are some things that were not good about this line follower? Do you think the line follower can be improved? It wiggles a lot. Smoother line followers are described in the Advanced lessons What sensor measures how far you have travelled? The rotation sensor used in Challenge 2 solution measures how much the wheels have turned How would you write a line follower that will stop when it sees a line? Or another color? Change the loop exit condition to use the color sensor. 2016 EV3Lessons.com (Last edit: 7/04/2016) 18

CREDITS This tutorial was created by Sanjay Seshan and Arvind Seshan More lessons are available at www.ev3lessons.com This work is licensed under a Creative Commons Attribution- NonCommercial-ShareAlike 4.0 International License. 2016 EV3Lessons.com (Last edit: 7/04/2016) 19