MSPM0_K210 handwritten digit recognition

1. K210 communicates with MSPM0

1.1 Experimental prerequisites

This tutorial uses the MSPM0G3507 development board. K210 needs to run the program in K210-AI(MSPM0G3507) to start the experiment

MSPM0G *1

K210 visual module *1 (must have an SD card (with AI models), camera)

USB to TTL module *1

1.2 Experimental wiring

Method 1: Use USB to TTL module

MSPM0GK210 visual module
RXTXD
GNDGND
VCC5V
MSPM0GUSB to TTL module
TXRXD
GNDGND

Method 2: Use the onboard Type-C port

1.3 Main code explanation

This example sets the baud rate of the serial port printing to 115200 bps, and the baud rate of the k210 module connection is set to 115200 bps.

5

6

After the above program, if this routine is run, the members of the k210_msg structure will have corresponding values ​​and will be processed through the serial port printing

k210_msg: is the structure for receiving information, and its main members are

After the data is received and processed by the function, each member of k210_msg will store valid information. If you want to perform secondary development, you can directly call the members of k210_msg

Note: The keil project source code must be compiled under the SDK path.

1.4 Experimental Phenomenon

  1. After connecting the cable, the K210 perspective module runs offline. Please check 【6.2 K210 as coprocessor】--【ReadMe】

Link:http://www.yahboom.net/study/K210-Al-Camera

  1. Set the serial port assistant to the interface shown in the figure

3

  1. Then run the handwritten digit recognition routine, and the serial port assistant will print out the important information transmitted by k210 to MSPM0G, as shown in the figure below

4

Handwritten digit recognition only transmits one member variable of k210_msg, id.

id: refers to the recognized digital ID (0-9)