yahboom
HomeLearn
Solution
Blog
Online Store
About Us
EN/中文
WiFi Camera Module📖
1.Configure WiFi camera on PC
  • Serial port configuration WiFi instructions
2.Configure WiFi camera on MCU
  • 1. jetson
  • 2. microbit
  • 3. STM32
  • 4. Raspberry Pi
3.APP control car
1. 4wd_uno car
  • 4wd_uno car
2. pico car
  • pico car
4. tinybit
  • 4. tinybit
5. Super:kit
  • A.Mobile shooter
  • B.Pretty car
  • C.Clip robot
  • D.Proficient carrier
  • E.Skip car
  • G.Spider
3. STM32 car
  • STM32 car
4.APP control PTZ
  • 1. 4wd_uno car (with PTZ)
  • 2. pico car (with PTZ)
  • 3. STM32 car (with PTZ)
  • 4. superkit-control servo PTZ
5.AI Vision
  • 1. AI visual recognition mode switching
  • 2. Cat and dog detection
  • 3. Face Detection
  • 4. Color recognition
  • 5. Person recognition
  • 6. QR code recognition
  • 7. Implementation of visual line inspection solution
Download
  • Annex
  • Code
  • PTZ Assembly Steps
Download ZIP

Welcome to WiFi Camera Module repository

7. Implementation of visual line inspection solution

Implementation of visual line patrol solution

It is recommended that those with zero basics first improve their knowledge of microcontrollers, car control, pid, etc., and then read this tutorial

  1. First determine whether the version of the image transmission module is the AI ​​version firmware. If you already know the firmware version, you can ignore this step and use the wifi_ver command to query, as shown in the figure below image-2024080600001
  2. Switch the mode to color recognition mode and send the following command through the serial port assistant ai_mode:3, after successful configuration, the module will restart and print the current firmware version, and then color recognition can begin, as shown in the figure image-2024080600002

Note: If the current mode is already in color recognition mode, the module only returns ok image-2024080600003

The first two steps can be sent directly using the microcontroller master control. You can refer to the Master control configuration wifi camera section. The serial port baud rate of the master control is: 115200, 8 data bits, 1 stop bit.

  1. From this step, you need to keep the photos of the image transmission module open normally. You can use the app to browse the page or use the browser to access it. The IP address to access is 192.168.4.1. Connect to the hotspot generated by the image transmission module.
  2. To start recording the color, you need to define the buttons of the car. Each time you press the button, use the serial port to send the keyword KEY_MENU to the image transmission module. After the image transmission module receives it, an admission box will appear on the screen, as shown in the figure image-2024080600005 Warm Tips: You can send KEY_UPUP** through the serial port to increase the selection of the admission box, and send KEY_DOWN to reduce the selection of the box**. These keywords can be realized by using the buttons of the car KEY_UPUP: image-2024080600008

KEY_DOWN: image-2024080600009

  1. After selecting the color, define the car's buttons and send KEY_PLAY through the serial port. After confirming the selected color, the screen's entry box will disappear, and then the color just entered will be directly recognized. And send the coordinates of the upper left corner and lower right corner of the first recognized box through the serial port. The specific content is $upper left corner x-axis coordinate, upper left corner y-axis coordinate, lower right corner x-axis coordinate, lower right corner y-axis coordinate, # Note: You need to open the screen to start recognition. If the screen is closed in the middle, the recognition will also be closed.

Result: image-2024080600006

Serial port information: image-2024080600004

  1. Calculate the position of the identification frame according to the protocol The calculation is as follows: the upper left corner x-axis coordinate + (lower right corner x-axis coordinate - upper left corner x-axis coordinate)/2 is the position of the center point of the frame. For line patrol, you only need to calculate the direction of the X axis, and the Y axis direction only needs to give a forward speed. For example: the x-axis coordinate of the lower right corner is 180, and the x-axis coordinate of the upper left corner is 90, then the coordinate of the center point is 90+(180-90)/2 = 135 However, the size of the entire image is 320*240 resolution, so the absolute center of the x-axis is 160.
  2. Using the error of the x-axis, calculate the pwm error to be corrected through the position-based pid. The formula of pid is as follows, and the output value is the pwm pulse of the corrected motor

Out=pid.Kppid.err+pid.Kipid.integral (accumulated error)+pid.Kd*(pid.err-pid.err_last);

The pulse output by pid plus the speed pwm pulse of the motor in the Y-axis direction is the total pwm pulse output by a single motor.

  1. Finally, adjust the parameters of pid to patrol the track according to your own color.

The following is a detailed flowchart of the solution image-2024080600010

QR code recognition

COMPANY

  • About us
  • Team Style
  • Blog

LEARNING & EXPLORATION

  • Tutorials
  • Edge AI hardware
  • Educational robots
  • Embedded intelligent hardware

WHERE TO BUY

  • Yahboom Online Store
  • Amazon
  • Alibaba
  • AliExpress
  • Mercado

TECHNOLOGY SUPPORT

  • Email: support@yahboom.com

BE A DISTRIBUTOR

  • Email: sales@yahboom.com
QR Code

Copyright © 2017-2026 Yahboom. All Rights Reserved.

EN/中文