Welcome to Tiny:bit Pro repository
1.2 Parsing K210 protocol data
1. K210 building blocks
URL for k210 library: https://github.com/YahboomTechnology/K210-Module
2. Block types
Number type blocks: face recognition, handwritten numbers, self-learning detection, height, width, X-axis, Y-axis
String type blocks: face detection, object detection, machine code id, mask detection, machine code detection, colour recognition, QR code detection, barcode detection
3. Building Blocks Introduction

face_detect scan return: return "Y" when face is detected; return "N" when no face is detected.

Apriltag_id return: return the ID value of the recognized machine code.

handwriting_number return: can return 0-9, total 10 numbers. It will return -1 if there is no recognition.

self_learning scan return: it will return the class id (there are three classes for autonomous learning, and the ids are 1, 2 and 3 respectively).

object_detct scan return: it can return the id of a specific object.
20 kinds of objects can be detected: "Aircraft", "Bicycle", "Bird", "Boat", "Bottle", "Bus", "Car", "Cat", "Chair", "Cow", "Dining Table", "Dog", "Horse", "Motorbike", "Person", "Potted Plant", "Sheep", "Sofa", "Train", "TV Screen".

face_reg scan return: return the id of the recognized face, when unregistered face is recognized it will return -1, by default it will return -2.

face_mask scan return: Returns "Y" when the face is recognized as wearing a mask, and "N" when the face is recognized as not wearing a mask.

Apriltag scan return: it will return all the contents of the machine code (family code + id).

color scan return: it can return the first capital letter of the four colors of red, yellow, blue and green ("R", "G", "B", "Y").

QRcode scan return: Returns the content of the QR code.

Barcode scan return: returns the content of the barcode.

reg_H return/reg_W return/reg_Y return/reg_X return: returns the height and width of the color block as well as the X-axis and Y-axis values.

init_SerialPort: initialize the serial port pins, P1 is TX, P2 is RX. baud rate is 115200.
4. Receiving blocks
When receiving blocks, we need to do some processing.
String type blocks, you can refer to the following figure to receive:
Numeric type blocks can then be received in the same way as shown below: