This tutorial uses microbit V2.0, and K210 requires running the program in * * K210-AI (microbit) * * to start the experimentMicrobit * 1Eyu clip * 3Several DuPont LinesK210 perspective module * 1 (requires SD card (with AI model inside) and camera)USB to TTL module * 1Import 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
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 barcode recognition
This experiment displays the identified content of barcode recognition
1.5 Microbit calls the building blocks to parse the results of K210, and the roles of each block