Presentation is loading. Please wait.

Presentation is loading. Please wait.

How to design, build, and program a LEGO robot!

Similar presentations


Presentation on theme: "How to design, build, and program a LEGO robot!"— Presentation transcript:

1 How to design, build, and program a LEGO robot!
LEGO Mindstorms EV3 How to design, build, and program a LEGO robot!

2 Class Basics Instructor: Karen Mayes
Lead instructor in Marquette’s Engineering Outreach program Former Executive Vice President of an Environmental Technologies Company Former Chemist Former Physics Teacher at Oak Creek High School, 10 years teaching grades 6-12 Mentor for a community-based FIRST Robotics Team: “MORE ROBOTICS, Team1714” in South Milwaukee Mom to 11-year old twins.  Assistant(s) introduce yourselves! Class schedule: 9am to Noon OR 1PM to 4PM

3 Ground Rules! “1, 2, 3, LEGO!” means, “Stop what you’re doing and listen.”  We will take a restroom and walking break, but if you need to leave the room, let an adult know. Kits are expensive. Respect the equipment! Kits are ORGANIZED. Please keep your own kit completely separate from everyone else’s.

4 What are YOUR responsibilities?
Be respectful. Remember… kits are expensive Classmates have feelings Instructors expect cooperation Be a team member. Listen. Give opinions in a thoughtful way. Share. Stay on task Fun is GOOD… but make it productive fun! Use tools appropriately. Follow the progress chart as a guide!

5 What will we do today? Get our brains warmed up!
Learn about hardware and software Learn “Lego Lingo” Modify your robot to perform different tasks Write your own programs Complete some robot challenges!

6 Do you already have Lego experience?
GREAT! If you know how to build with “Technic” Legos OR If you have used the last version of Lego Mindstorms (the NXT), then… You are a JUNIOR TEACHER! You can help classmates who are new to these topics! Here’s your chance to be a leader – not a show-off.

7 Computer The “Brick” The brain of your robot Stores programs
Sends and receives signals Connection to the computer’s USB port Motor Ports are labeled with LETTERS. Sensor Ports are labeled with NUMBERS. EV3 Control Panel

8 Brick Buttons Top left button means NO or STOP or BACK
Display’s EV3 Menus Center button means YES or GO Light gray buttons are arrow up, down, left and right.

9 Chassis Lego Technic parts – We’ll talk more about these later!

10 Drive Train – Motors! Large motors can turn wheels
The red circle spins Be careful – turning them manually can damage motors! On the TOP of the brick Motor Ports are labeled with LETTERS.

11 Electronics Cables Power Cord

12 Automation/Programming
Mindstorms EV3 Programming More later!!

13 Manipulator You can add parts to your robot!
The EV3 comes with a “Medium Motor” It is designed to allow your robot to move things other than wheels!

14 The Brick Menus Recently File Used Menu Programs

15 Basics Getting started… (Video!)
The programming blocks are drag-and-drop Each program block corresponds to part of the robot Each program block has places to customize the instructions NOTE: “Download” is probably better than “Download and run” Download Download and Run

16 Introduction to the EV3 Program
To start a new program click here Intro Screen has some helpful links at the bottom

17 Programs and Projects You can have several programs associated with a single project. A program is a set of specific instructions A project can contain several programs To create a new project, click the TOP “+” tab. To create a new program, click the BOTTOM “+” tab. New Project New Program

18 The motor blocks Today, we’ll only use the large motors.
Three ways to move: Single motor Steering Tank NOTE: A positive speed goes FORWARD. A negative speed goes BACKWARD.

19 Display text, shapes and sounds
Lego provides a library of graphics and sounds with the EV3. Use the display blocks to see or hear them. The controls for these blocks is in the upper right corner. Put a Wait block after the display functions, or they will flash across the screen before you can see them!

20 Sensor Blocks: Waiting for input
You can program your robot to wait for something It can do other things while it’s waiting Use the hourglass and then customize it The block will look different once you’ve customized it! Default: Waits a certain amount of time Customize it to wait for the touch sensor

21 “Compare” vs. “Change” When you tell a sensor to “Compare” two values, it will look for those ACTUAL numbers. Telling the Ultrasonic Sensor to “compare” using the “less than” operator with a value of 3cm means… “I will alert when there is something less than 3cm in front of me.” When you tell a sensor to sense a “Change” in two values, it will look for the DIFFERENCE between them. Telling the Ultrasonic Sensor to sense a “change” using the “less than” operator with a value of 3cm means… “I will look ahead of me and send alerts as long as the distance between me and the object has changed less than 3 cm.” This will be very important if you program the gyro.

22 The Light Sensor The Light Sensor can “see”
We will primarily use it to see Colors Reflected light Stop on a black line using reflected light:

23 The Ultrasonic Sensor The Ultrasonic Sensor uses light waves that we can’t see to determine if there’s an object in front of it. It can also tell how far away the object is.

24 The Gyro The Gyro helps the robot turn EXACTLY in the direction you want. Much easier than guessing how long it takes to make a turn!

25 Gyro Programming Just like the other sensors, use the WAIT command after your motor block. Turn the motors ON (steering mode) and select the direction as 100 Grab a wait command and change the clock to the GyroChange Angle Enter how many degrees you want to turn. Before every turn, add a “reset” block

26 Using Loops I can use a LOOP to make the robot perform an action multiple times. This program will make the touch-sensor program run twice. Change to “Count” Number of loop repeats

27 Using a “Switch” Command
A switch allows the EV3 to choose several options The EV3 makes this decision instantaneously A simple example using the color sensor The EV3 will measure which color it’s seeing, then If it’s WHITE, it will go forward a little and stop. If it’s BLACK, it will go backwards a little and stop.

28 Using “Loop” and “Switch”
A switch makes the EV3 make an instant decision, once. What if you want the EV3 to make that decision over and over? Use a loop! Here, the EV3 makes the “black or white?” decision, THEN moves forward or backward for One second, THEN makes the decision again!

29 Tips on using a “Loop/Switch”
The slower the robot, the more time it has to measure The more often you have it make the decision, the more accurate it will be. Example: if I changed the previous program to only move forward or backwards for 0.1 seconds, it will be less likely to miss a line!

30 Your first program Example: Read your program like a sentence!
Make your robot move until the touch sensor hits something and Then back up and Then stop Read your program like a sentence!

31 BREAK! Restroom Hand washing Tour of the building Snacks?

32 Challenges! Choose any of the four challenges to start with.
When you complete the challenge, have an adult give you a star for that activity You can earn more stars if you complete the challenges using more advanced programs!

33 Try new things! If you aren’t sure something will work… Try it!
If you get stuck, ask for help! If an instructor isn’t immediately available, try a classmate.  Lend help if you are asked and are able to!

34 Robot Challenges… “KICK THE CANS”
Write a program (with or without sensors) to push as many cups/cans outside the circle as possible. “STOP FOR PEDESTRIANS” Program your robot to stop before hitting the little LEGO figures Bonus points if you can have it slow down in the yellow zone first. “STAY INSIDE THE LINES” Use the light sensor to keep your robot from leaving the area surrounded by black lines “WEAVE THROUGH TRAFFIC” Have your robot use the ultrasonic sensor to weave through a line of boxes

35 Clean Up! Please try to return Legos from where you found them. (Do your best!) Check the floor! Make sure all boxes are closed tightly THANK YOU!!


Download ppt "How to design, build, and program a LEGO robot!"

Similar presentations


Ads by Google