Advanced Light/Color sensors calibration for more than one sensor Pro Preview

In the course section for Advance Sensor Calibration we previously showed you how to find the minimum and maximum value for a single LEGO Mindstorms Color Sensor and to store this value in an array. The program was implemented with the EV3-G software. In this tutorial we are going to find the Min and Max for all the four sensors and to store all the 8 values in an array.

  • #635
  • 04 Oct 2017
  • 7:39


What we could just do is copy/paste the logic for a single sensor and in this way have it for many sensors. Copy/pasting is a possible solution and we are using it in this specific program. A much more beautiful and smart solution would be to extract the logic in a single block and to do some calculation on the indexes, but this will be shown in some of the next tutorials. For now, just copy paste and blocks for the second sensor and have the logic repeated four times for sensors 1,2,3,4. The min and max values should be stored in the following way

Sensor 1 Min -> Array Cell 0

Sensor 1 Max -> Array Cell 1

Sensor 2 Min -> Array Cell 2

Sensor 2 Max -> Array Cell 3

Sensor 3 Min -> Array Cell 4

Sensor 3 Max -> Array Cell 5

Sensor 4 Min -> Array Cell 6

Sensor 4 Max -> Array Cell 7

Do you already see the formula ? :)