Following the Advance Sensor Calibration course section, we found the min and max values detected by each sensor. Now it is time for the real deal of the calibration. Detect the current value from the sensor and find what is the percentage of this value for the range between min and max.
- #636
- 04 Oct 2017
- 8:34
- LEGO MINDSTORMS, LEGO MINDSTORMS EV3
- FIRST LEGO League, EV3-G, Sensors, EV3, Array, Light and Color Sensor, FLL, Programming
Percentage
What is a percentage? Go figure it out. Here is a very good video Finding a percentage | Decimals | Pre-Algebra | Khan Academy. After you understand the concept of percentage we are waiting for you back here.
Percentage of sensor value min and max
The percentage is calculated using the following formula:
(currentValue - min)/(max-min)*100
We are taking the value from the sensor, along with the value for min and max from the array and we do a calculation of the percentage. This formula will give us a value between 0 and 100 when 0 is DARK and 100 is BRIGHT. (I don't want to say black and white here)
Курсове и занятия включващи този Урок
Този Урок е използван в следните курсове и занятия.

FIRST LEGO League Competition. Constructing and Programming a Robot Base
This course if used by teams, mentors and students to structure the preparation for the Robotics Game of the FIRST LEGO League Robotics Competitions. One thing that is common each year at FLL is that experience matters a lot. Our goal with this course is to quickly bring new teams up to speed with experienced teams and to share some new tricks, patterns, constructions with the more experienced teams.
- 42
- 249:53
- 10
Advanced Light/Color Sensor Calibration
Would you like to resolve all the problems with the light/color sensors that you have? And to make all of them work in a predictable, stable way even when using more than one MINDSTORMS colour sensors.
When using Color sensors it is important to calibrate them depending on the light conditions in your venue. In this way, the calibrated sensor will show values between 0 and 100 independent of the light conditions. But using the default EV3 colour calibration available in the colour sensor block could lead to unpredicted problems that are difficult to track and resolved especially when used with multiple Color sensors. So in this series of tutorial we implement the calibration ourselves discussing the principles of colour sensor calibration.
- 15
- 0
- 4
- 3d_rotation 0