pico_ K210 Autonomous Learning Classification

1.K210 and Pico communication

1.1 Experimental premises

This tutorial uses Pico, and K210 requires running the program in K210-AI (stm32_pico_arduino) to start the experiment Pico * 1 K210 perspective module * 1 (requires SD card (with AI model inside) and camera) USB to TTL module * 1

1.2 Experimental wiring

picoUSB to TTL module
GP8RXD
GNDGND
picok210
GP9TXD
GNDGND
VCC5V
Wiring as shown in the diagram: 

image-2023060700002 image-2023060700001

1.3 Main code parsing

Obtained from the program

This processing mainly involves receiving a message from k210 and calling recv_ K210_ Data() for processing and assigning the processed information to k210_ Data_ Members of XXX. Attention If you want to develop for the second time, without changing the K210 program and data processing functions, directly call K210_ Data_ The variable of XXX is good (xxx: refers to x y w h id msg)

1.4 experimental phenomena

  1. After connecting the cable, the K210 perspective module runs offline. Please check 【6.2 K210 as coprocessor】--【ReadMe】
  2. Set the serial port assistant to the interface shown in the figure image-2023060700004
  3. Download Pico's Python firmware into Pico and run the color recognition program provided in this tutorial. How to run Pico's Python program? Please refer to the Pico related environment building tutorial, which will not be elaborated in this tutorial
  4. Then k210 runs the relevant routines, and the serial assistant will print out the important information transmitted by k210 to Pico. The phenomenon shown in the following figure is the result of autonomous learning classification image-2023060700005 This routine only outputs data for one member of the ID ID: Refers to the object ID when taking a photo, and the range of IDs (1-3)