yahboom
HomeLearn
Solution
Blog
Online Store
About Us
EN/中文
Roboduino V2📖
0.Instruction manual
  • Instruction manual
1.Get started quickly
  • 01.Assembly of the Car
  • 02.Remote Control Car
  • 03.Common Problem Analysis
  • 04. Lithium Battery Pack and Charger Usage Guidelines
  • 05. Important Notes (Read Before Starting)
2.Environment Construction
  • 01.Serial port driver installation
  • 02.Arduino IDE Installation
  • 03.Arduino IDE usage
  • 04.Using third-party libraries
  • 05.Program compilation and upload
3.Basic car course
  • 01.RGB Control
  • 02.Serial Print
  • 03.KEY Read
  • 04.Buzzer control
  • 05.Logo Breath
  • 06.Servos Control
  • 07.Motor Control
  • 08.Ultrasonic Ranging
  • 09.Track Print
  • 10.Infrared Remote Print
  • 11.WIFI Camera
4.Advanced car course
  • 01.RGB Breath
  • 02.Play Music
  • 03.KEY Control RGB
  • 04.KEY Control Buzzer
  • 05.Serial Parse Data
  • 06.Parse Data Control Motor
  • 07.Parse Data Control RGB
  • 08.Parse Data Control Buzzer
  • 09.Parse Data Control Servo
5.Car motion control
  • 00.Mecanum wheel motion principle
  • 01.Car Vertical Movement
  • 02.Car Diagonal Movement
  • 03.Car Sideways Movement
  • 04.Car Rotational Movement
  • 05.Car Patrol
6.Comprehensive gameplay of car
  • 01.Car tracking
  • 02.Car Obstacle Avoid
  • 03.Car Follow Hand
  • 04.Car tracking Avoid
  • 05.Car Infrared Remote
  • 06.WiFi Control Car
  • 07.IR WiFi Control Car
7.AI vision course
  • 1. Cat(dog) detection
  • 2. Color recognition
  • 3. QR code instructions
  • 4. Person Recognition
  • 5. Face Detection
  • 6. Color Follows
  • 7. Face following
8.Expand peripherals
  • 01.Digital Tube Display
  • 02.Color Recognition
Download
  • Code
  • Library
  • Hardware manual
  • Software
  • 3D Model
  • Instruction Manual
Download ZIP

Welcome to Roboduino V2 repository

11.WIFI Camera

WIFI Camera

WIFI CameraDevice connectionHardware connectionSoftware connectionWIFI cameraControl principleControl pinsControl instructionsCode analysisExperimental results

Configure the WIFI camera network mode.

xxxxxxxxxx
For the first use, it is not recommended to configure it yourself, just keep the factory settings!
For more detailed information about the WiFi camera, please refer to: http://www.yahboom.net/study/ROS-WiFi

Device connection

Hardware connection

Use Type-B data cable to connect Arduino Uno and computer.

Software connection

Open the "Arduino IDE" software and select the model and serial port number corresponding to the development board.

WIFI camera

The WIFI camera module integrates the ESP32-S3 chip and 200W camera. The serial port or serial port module can be used for network configuration to achieve wireless image transmission.

Control principle

We mainly use the WIFI camera module for application, and do not make underlying modifications. We only need to send data in a specified format through the serial port interface of the WIFI camera module to make corresponding configurations.

Control pins

image-20240604181142186

Peripheral module (WIFI camera)Arduino Uno
VCCVCC
TXDRX (0)
RXDTX (1)
GNDGND

Control instructions

If it is the first time to use, it is not recommended to configure it yourself.

CommandDescriptionExampleReturn value
wifi_mode:Configure network mode → 0: AP mode 1: STA mode 2: AP+STA modewifi_mode:2ok
sta_ssid:Name of connected wifista_ssid:Yahboom2ok
sta_pd:Password of connected wifista_pd:yahboom890729ok
ap_ssid:Name of set hotspotap_ssid:Yahboom_ESP32_WIFIok
ap_pd:Password of set hotspotap_pd:ok
sta_ipQuery sta mode ip addresssta_ipReturn own ip address
ap_ipQuery ap mode ip addressap_ipReturn own ip address
wifi_resetRestore wifi configuration to factory settingswifi_resetReset_OK
wifi_verQuery the version of wifi firmwarewifi_verYAHBOOM VerSion:***

Code analysis

Here we only briefly introduce the code content. For detailed code, please refer to the corresponding code file, which is provided in the download area!

  • Define the WIFI camera network mode and network parameters

​x
// 定义WiFi摄像头网络模式 Define the WiFi camera network mode
#define AP_MODE 0
#define STA_MODE 1
#define STA_AP_MODE 2

// 配置网络模式参数 Set network mode parameters
const char* WIFI_Name = "Yahboom2"; // 设置需要连接的WiFi名称 Set the name of the WiFi to be connected
const char* WIFI_Password = "yahboom890729";  // 设置需要连接WiFi的密码 Set the password that you need to connect to WiFi
const char* AP_Name = "Yahboom_ESP32_WIFI"; // 设置自发热点的名称 Set the name of the spontaneous hotspot
const char* AP_Password = ""; // 设置自发热点的密码 Set the password of the spontaneous hotspot
const int Mode = STA_AP_MODE; // 设置网络模式 Set network mode
  • Get WiFi camera version

x
/**
 * @brief 获取wiFi摄像头版本 Get WiFi camera version
 * @param 无 None
 * @retval 无 None
 */
void getVersion(void) {
  Serial.print("wifi_ver");
  delay(500);
}
  • Restore factory settings

x
/**
 * @brief 恢复出厂设置 Restore factory settings
 * @param 无 None
 * @retval 无 None
 */
void setReset(void) {
  Serial.print("wifi_reset");
  delay(2000);
}
  • Set the network mode

x
/**
 * @brief 设置网络模式 Set the network mode
 * @param Mode: 网络模式 The network mode
 * @retval 无 None
 */
void setMODE(const int Mode) {
  Serial.print("wifi_mode:" + String(Mode));
  delay(1000);
}
  • Set WiFi connection information

x
/**
 * @brief 设置wiFi连接信 Set WiFi connection information
 * @param WIFI_Name: WiFi名称 WIFI Name
 * @param WIFI_Password: WiFi密码 WIFI Password
 * @retval 无 None
 */
void SetWIFI(const char* WIFI_Name, const char* WIFI_Password) {
  Serial.print("sta_ssid:" + String(WIFI_Name));
  delay(1000);
  Serial.print("sta_pd:" + String(WIFI_Password));
  delay(5000);
}
  • Set AP connection information

x
/**
 * @brief 设置自发热点信息 Set AP connection information
 * @param AP_Name: 热点名称 AP Name
 * @param AP_Password: 热点密码 AP Password
 * @retval 无 None
 */
void SetAP(const char* AP_Name, const char* AP_Password) {
  delay(500);
  Serial.print("ap_ssid:" + String(AP_Name));
  delay(1000);
  Serial.print("ap_pd:" + String(AP_Password));
  delay(5000);
}
  • Get STA ip

x
/**
 * @brief 获取STA模式IP Get STA ip
 * @param 无 None
 * @retval 无 None
 */
void getSTAIP(void) {
  Serial.print("sta_ip");
  delay(500);
}
  • Get AP ip

x
/**
 * @brief 获取AP模式IP Get AP ip
 * @param 无 None
 * @retval 无 None
 */
void getAPIP(void) {
  Serial.print("ap_ip");
  delay(500);
}
  • Initialization Code

xxxxxxxxxx
void setup() {
  Serial.begin(115200);               // 初始化串口波特率115200 Initialize serial communication at 115200 bps
  setMODE(STA_AP_MODE);               // 设置网络模式 Set the network mode
  SetWIFI(WIFI_Name, WIFI_Password);  // 设置WiFi连接信息 Set WiFi connection information
  SetAP(AP_Name, AP_Password);        // 设置自发热点信息 Set hotspot mode information
  getSTAIP();                         // 获取STA模式IP Get STA mode IP
  getAPIP();                          // 获取AP模式IP Get AP mode IP
  if (Serial.available() > 0) {
    Serial.print(Serial.readString());  // 打印WiFi摄像头返回的信息 Print the information returned by the WiFi camera
  }
}
  • Looping code

xxxxxxxxxx
void loop() {
}

Experimental results

After compiling the program successfully, upload the code to the Arduino Uno development board (do not install the WiFi camera module when burning the program, install the WiFi camera module after burning successfully).

After the program starts, the serial port will print the return information of whether we have successfully configured the WiFi camera. If the return information is all ok, it means that the setting is successful. You can cut off the power of the entire car, and then reconnect to the Arduino IDE to view the IP information.

Note: To configure the WiFi camera, you need to connect the battery pack and turn on the expansion board switch, otherwise the WiFi camera will restart, that is, the terminal will show the WiFi camera restart information;

Since the WIFI camera and Arduino Uno use the same serial port, please do not use the Serial.print() function to print data at will, otherwise it will cause the WIFI camera module to misidentify the command!

xxxxxxxxxx
The burning program cannot use other programs to occupy the serial port or an external serial communication module (for example: WiFi camera module), otherwise the program cannot be burned or an error message will be prompted!

image-20240612145743081

Infrared Remote Print
RGB Breath

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/中文