18. mBot2 Won't Detect Color Properly

This guide applies to:
mBot2 and mBot Neo.


Routine Check



In a Nutshell

The color detection program doesn't recognize color correctly.

This is usually related to the Quad RGB Sensor.


What to do:

 1. Calibrate the Sensor.

 2. Check if the sensor is faulty.

 3. Try the official example.


Step by Step

#1 Calibrate the Quad RGB Sensor

The sensor is sensitive to environmental factors such as light, surface material, and distance.

A calibration with your current environment can greatly increase the accuracy of the detection.

Please DO NOT calibrate when mBot2 is exposed to strong light.

  1. Get an A6 paper or use the white area of a line-following map.

  1. Connect mBot2 with mBlock and switch to the upload mode.

For details, please see this guide: https://support.makeblock.com/hc/en-us/articles/15850718565399

  1. Download the latest device extension for the Quad RGB Sensor

Note: If you see a green download icon, it means a newer version is available.

Click on the sign to update the extension, and then add the extension again to enable a complete experience.

  1. Find somewhere flat and place a piece of white paper.

Put mBot2 on it and power on the extension board

The recommended distance between the sensor and the paper is 12~13mm.

  1. Combine the event block and the Quad RGB Sensor block together. Upload to mBot2.

When the calibration is finished, CyberPi will display 'Calibration completed'.

After the calibration, please run a program that involves color detection.

See if it works. If not, the sensor itself could be faulty.


#2 Check if the Quad RGB Sensor is Faulty

  1. Place mBot2 on the black area of the map;

Or a piece of black paper on a flat surface.

Note: DO NOT use white paper for the test.

The sensor will recognize everything as white when faulty.

  1. Connect mBot2 and mBlock 5, and switch to live mode.

For details, please see this guide: https://support.makeblock.com/hc/en-us/articles/15850718565399

  1. Select and edit the quad RGB sensor block to detect color as shown below.

  2. See if it detects color correctly on the upper left section in the mBlock 5 home screen.

If it detects the color as black, which is correct, then move on to step #3.

If it detects the color as white, the sensor could be faulty, please contact support.



#3 Try the Official Example

  1. Go to Tutorials > Example Programs.

Upload the 'kp line follow' program to CyberPi.

  1. See if mBot2 can detect color correctly.

If not, please contact customer support.



Related Knowledge



Got Questions?

Feel free to contact us at:



Help Us Solve Faster

We have listed some useful information you can provide to us.

When you contact us, the more information you provide,

the better informed we will be and the quicker we can advise and answer your questions.


Not Sure Where to Find the Version Info?


Was this article helpful?
1 out of 1 found this helpful



Article is closed for comments.