ard_K210-object detection

1.K210 and Arduino communication

1.1 Experimental premises

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

1.2 Experimental wiring

arduinousb to ttl
TXDRXD
GNDGND
arduinoK210 perspective module
RXDTXD
GNDGND
VCC5V
Wiring as shown in the diagram: 

image-2023060600003

image-2023060600006

1.3 Main code explanation

After the above program, if you are running this routine, k210_ The members of the msg structure have corresponding values and are processed through serial port printing K210_ Msg: is a structure that receives information, and its main members are

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-2023060600004
  3. Then run the object detection routine, and the serial assistant will print out the important information transmitted from k210 to stm32, as shown in the following figure image-2023060600001

Object detection only transmits the six Member variable of k210msg, namely, x, y, w, h, id and msg. ID: The information includes (0. plane, 1. bicycle, 2. bird, 3. boat, 4. bottle, 5. bus, 6. car, 7. cat, 8. chair, 9. cow, 10. dining table, 11. dog, 12. horse, 13. motorcycle, 14. person, 15. potted plant, 16. sheep, 17. sofa, 18. train, 19. monitor)