Welcome to Building:bit Superkit repository
1.14 Color recognition
Color recognition
Color recognition1. Learning objectives2. Sensor wiring3. Programming3.1 Adding extension packages3.2 Building blocks used3.3 Combining blocks4. Experimental Phenomenon
1. Learning objectives
In this course, we mainly learn how to realize color recognition through MakeCode graphical programming.
2. Sensor wiring
The color recognition module is connected to the I2C (SDA, SCL) interface.

3. Programming
Method 1 Online programming:
First, connect micro:bit to the computer via a USB cable, a USB flash drive will pop up on the computer, click the URL in the USB flash drive:https://makecode.microbit.org/ to enter the programming interface. Then, add the Yahboom software package and you can start programming.
Method 2 Offline programming:
Open the offline programming software MakeCode and enter the programming interface. Click [New] and add the Yahboom software package to start programming.
superbit kit expansion pack:https://github.com/YahboomTechnology/SuperBitLibV2 Color recognition sensor:https://github.com/YahboomTechnology/module_world_color
3.1 Adding extension packages


3.2 Building blocks used
The locations of the building blocks required for this programming are shown in the figure below.


3.3 Combining blocks
The summary procedure is shown in the figure below.
You can also directly open the Color-recognition.hex file provided in this experiment and drag it into the browser that opens the URL, and the program diagram of this project source code will be automatically opened.
4. Experimental Phenomenon
After the program runs successfully, the dot matrix displays R, red value, G, green value, and B, blue value.