Welcome to K210 Module repository
1.microbit_ K210 color recognition
microbit_ K210 color recognition
1.K210 and microbit communication
1.1 Experimental premises
This tutorial uses microbit V2.0, and K210 requires running the program in * * K210-AI (microbit) * * to start the experiment Microbit * 1 Eyu clip * 3 Several DuPont Lines K210 perspective module * 1 (requires SD card (with AI model inside) and camera) USB to TTL module * 1 Import k210AI library:https://github.com/YahboomTechnology/K210-Module
1.2 Experimental wiring
| microbit | USB to TTL module |
|---|---|
| P1 | RXD |
| GND | GND |
| microbit | k210 |
|---|---|
| P2 | TXD |
| GND | GND |
| Wiring as shown in the diagram: |

1.3 Main code analysis

From the code, simply configure the serial port and call the relevant serial port and K210 building blocks for data acquisition
- X: The abscissa of the identification box
- Y: The vertical coordinate of the identification box
- W: The width of the identification box
- H: The height of the identification box
1.4 experimental phenomena
- After connecting the cable, the K210 perspective module runs offline. Please check 【6.2 K210 as coprocessor】--【ReadMe】
- Set the serial port assistant to the interface shown in the figure

- Download the hex program of this tutorial into microbit
- After starting recognition, you can see that the serial assistant prints something and the microbit screen also scrolls to display the received information. The experimental results in the following figure show the phenomenon of color recognition

This experiment displays the four values of x, y, w, and h in the color recognition box
1.5 Microbit calls the building blocks to parse the results of K210, and the role of each block
Website of K210 library:https://github.com/YahboomTechnology/K210-Module
