Bonus EV3 Programming Lessons By Droids Robotics PixyCam for MINDSTORMS Color Identifinder.

Slides:



Advertisements
Similar presentations
Squaring or Aligning on a Line
Advertisements

BEGINNER EV3 PROGRAMMING Lesson
By Droids Robotics Good Coding Practices: Start with Pseudocode BEGINNER EV3 PROGRAMMING LESSON © 2015 EV3Lessons.com, Last edit 4/1/
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.
BEGINNER PROGRAMMING Lesson
BEGINNER EV3 PROGRAMMING Lesson
INTERMEDIATE PROGRAMMING LESSON By: Droids Robotics Debugging Techniques.
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.
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.
Bonus EV3 Programming Lessons By Droids Robotics LEGO MINDSTORMS and Raspberry Pi Communicator.
Bonus EV3 Programming Lessons LEGO MINDSTORMS EV3Dev and Raspberry Pi Communicator.
PixyCam for MINDSTORMS Introduction
ADVANCED EV3 PROGRAMMING LESSON By Droids Robotics PROPORTIONAL ULTRASONIC WALL FOLLOWER © 2015, EV3Lessons.com, Last edit 11/17/2015.
Bonus EV3 Programming Lessons By Droids Robotics LEGO MINDSTORMS and Raspberry Pi IR Light controller.
Bonus EV3 Programming Lessons LEGO MINDSTORMS ev3dev and Raspberry Pi IR Light controller.
Bonus EV3 Programming Lessons By Droids Robotics PixyCam for MINDSTORMS: Color Codes.
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 Seshan Brothers Random Block.
ADVANCED EV3 PROGRAMMING LESSON By Droids Robotics © 2015, EV3Lessons.com (last edit 4/9/2015) Stall Detection with code from Hoosier Girlz.
BEGINNER PROGRAMMING LESSON
INTERMEDIATE PROGRAMMING LESSON
MINDSENSORS PSP-Nx Controller for LEGO® MINDSTORMS®
Proportional Control with the Sound Sensor
By Sanjay and Arvind Seshan
INTERMEDIATE PROGRAMMING LESSON
BEGINNER EV3 PROGRAMMING Lesson
BEGINNER EV3 PROGRAMMING Lesson
BEGINNER EV3 PROGRAMMING Lesson
INTERMEDIATE PROGRAMMING LESSON
INTERMEDIATE PROGRAMMING LESSON
INTERMEDIATE PROGRAMMING LESSON
By Sanjay and Arvind Seshan
INTERMEDIATE PROGRAMMING LESSON
INTERMEDIATE PROGRAMMING LESSON
BEGINNER EV3 PROGRAMMING Lesson
INTERMEDIATE PROGRAMMING LESSON
Proportional Control with the Sound Sensor
INTERMEDIATE PROGRAMMING LESSON
INTERMEDIATE PROGRAMMING LESSON
BEGINNER EV3 PROGRAMMING Lesson
INTERMEDIATE PROGRAMMING LESSON
Presentation transcript:

Bonus EV3 Programming Lessons By Droids Robotics PixyCam for MINDSTORMS Color Identifinder

Getting Started 1.Make sure you have done the PixyCam Introduction lesson, have signatures for red, green, blue, and yellow LEGO blocks, and have installed the PixyCam EV3 blocks 2.Use the instructions on Mounting Pixy with LEGO to mount a LEGO piece on to the cameraMounting Pixy with LEGO 3.Use additional LEGO pieces to connect your PixyCam to your robot wherever you decide 4.Use the wire provided to plug in your PixyCam to your robot in port 1 © EV3Lessons 2016 (Last Update: 1/20/2016)2

Learning the PixyCam Block ■Pixy Camera block – It is located in the yellow programming tab –We will be using it in Measure – Read Signature mode –We will be using the Signature Output which outputs which signature the camera detects © EV3Lessons 2016 (Last Update: 1/20/2016)3 Signature output

Challenge ■Use your PixyCam to have your EV3 recognize 4 different LEGO bricks (Red, Green, Blue, Yellow) and say which color it is ■Every time you show the PixyCam a different color, the EV3 will say the color out loud ■You will need the yellow Pixy Camera block, the Switch block in numeric mode, the Sound block and a Loop to complete this challenge Pseudocode: 1.Detect which signature the camera is seeing 2.Use the value of the signature to know which color to say 3.Repeat the last two steps © EV3Lessons 2016 (Last Update: 1/20/2016)4 Watch Solution Video

Challenge Solution © EV3Lessons 2016 (Last Update: 1/20/2016)5 Use a data wire to connect the Signature Output (#) value to the Switch block which is in numeric mode Click on the “+” to create 4 choices/”cases” in the switch block “0” will have no contents. Nothing will play if the PixyCam doesn’t recognize the object “1”, “2”, “3” & “4” each have a sound block that will play Yellow, Green, Red and Blue sounds for its respective signature

Detecting Too Many Colors? ■If there are distractions in the background or foreground, you might get false positives –Try recreating and tuning your signatures more for better results. –Add code so that the robot does not recognize smaller items of the same color in the background. © EV3Lessons 2016 (Last Update: 1/20/2016)6 Multiply together the width and height of the object by taking the output (dimensions) from the PixyCam block and putting them in a Math Block. Take the result and put them into a Compare block. If the result is greater than “200”, it will be true. You have to use trial and error to get this “magic” number. (One trick it to hit play on your code in the software and look at the data going through the wire to get an idea for dimensions that would work as a threshold/minimum.) We have a Switch Block inside a Switch Block. The sounds will play only when the outer switch is True which means that the object meets the dimension requirements we specified.

CREDITS This tutorial was created by Sanjay Seshan and Arvind Seshan from Droids Robotics. More lessons are available at Author’s Thank you to Marc-André Bazergui for loaning us the PixyCam for this lesson, ( Copyright © EV3Lessons.com 2015 (Last edit: 2/26/2015) This work is licensed under a Creative Commons Attribution- NonCommercial-ShareAlike 4.0 International License.Creative Commons Attribution- NonCommercial-ShareAlike 4.0 International License 7