0% found this document useful (0 votes)
36 views

Intermediate Programming Lesson: Calibrating Color Sensors

The document discusses how to calibrate color sensors for a robot. It explains that calibration teaches the sensors what black and white levels are, and that this should be done whenever lighting conditions change. Steps for a sample calibration program are provided, including resetting values, taking readings on black and white, and saving those values.

Uploaded by

tofanvictor13
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views

Intermediate Programming Lesson: Calibrating Color Sensors

The document discusses how to calibrate color sensors for a robot. It explains that calibration teaches the sensors what black and white levels are, and that this should be done whenever lighting conditions change. Steps for a sample calibration program are provided, including resetting values, taking readings on black and white, and saving those values.

Uploaded by

tofanvictor13
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

INTERMEDIATE

PROGRAMMING
LESSON

CA LIBRAT ING COLOR SENSORS

By Droids Robotics
Lesson Objectives
1) Learn why you need to calibrate your color sensors
2) Learn what calibration is
3) Learn how to calibrate your color sensors

©2015 EV3LESSONS.COM, LAST EDIT 4/5/2015 2


Why Calibrate?
When you use your EV3 Color Sensor in Light Sensor Mode (e.g., reflected light
mode), you should calibrate it
Calibration means “teaching” the sensor what is “Black” and what is “White”
◦ This makes White read as 100 and Black read as 0

Run your Calibrate Program whenever light or table conditions change


If you are in First Lego League, it is probably a good idea to run it before you start
a table run where you use your EV3 Sensors in Light Mode
If you have 2 Color Sensors, the same calibration will apply to BOTH sensors. You
don’t have to make a different calibration program for each color sensor. Make it
using 1 sensor on one of the ports and the values will apply to both.
◦ If you have sensors that are very different from each other, you will need to write your
own custom calibration.

©2015 EV3LESSONS.COM, LAST EDIT 4/5/2015 3


Steps/Pseudocode for Calibration
Challenge: Write a program that will calibrate your EV3 Color Sensors for black
and white.
Pseudocode:
Reset the existing calibration values
Display that the user should place the robot on “black” and press ok
Read the Color Sensor Block in Light mode and save it to the Color Sensor Block in
Calibrate mode.
Repeat above steps for calibrating “white”.

©2015 EV3LESSONS.COM, LAST EDIT 4/5/2015 4


Calibrate Program Solution

• When you run the above Calibrate Program, you will be asked to place the
robot on a BLACK section of the mat and then hit center EV3 button.
• Then you will be asked to place the robot on WHITE and hit center EV3
button.

©2015 EV3LESSONS.COM, LAST EDIT 4/5/2015 5


Discussion Guide
1. When do you need to calibrate your color sensor?
◦ When it is used in reflected light mode

2. If I have two color sensors, do I need to calibrate each one?


◦ The calibration applies to both (or all) the color sensors you have connected to your
brick

3. What are you doing when you calibrate?


◦ You are teaching the sensors what “black” and “white” mean

4. Should you calibrate for other colors (e.g. green) if you want to follow a green
line?
◦ No, you always calibrate for black and white.

©2015 EV3LESSONS.COM, LAST EDIT 4/5/2015 6


Credits
This tutorial was created by Sanjay Seshan and Arvind Seshan from Droids
Robotics.
Author’s Email: team@droidsrobotics.org
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/5/2015 7

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy