Google Chat: zj734465502@gmail.com
+86-0755-88291180
sales@spotpear.com
dragon_manager@163.com
tech-support@spotpear.com
zhoujie@spotpear.com
WhatsApp:13246739196
ESP32-S3-Relay-1CH is an industrial-grade 1-channel WiFi network relay based on ESP32-S3 main controller and supports WiFi, Bluetooth, RS485, and other peripheral interfaces. It has built-in protection circuits such as power supply isolation and optodecoupler isolation, which is safe, stable and reliable, and suitable for the AIoT field.
ESP32-S3-Relay-1CH currently provides Arduino-IDF development tool and framework, and you can choose the right development tool according to your project needs and personal habits.
Arduino IDEArduino IDE is an open source electronic prototyping platform, convenient and flexible, easy to get started. After a simple learning, you can start to develop quickly. At the same time, Arduino has a large global user community, providing an abundance of open source code, project examples and tutorials, as well as rich library resources, encapsulating complex functions, allowing developers to quickly implement various functions. |
This chapter introduces setting up the Arduino environment, including the Arduino IDE, management of ESP32 boards, installation of related libraries, program compilation and downloading, as well as testing demos. It aims to help users master the development board and facilitate secondary development.
Board name | Board installation requirement | Version number requirement |
---|---|---|
esp32 by Espressif Systems | "Install Offline" / "Install Online" | 3.0.x |
Library Name | Description | Version | Library Installation Requirement |
---|---|---|---|
ArduinoJson | Lightweight JSON library | v6.21.4 | "Install Online" or "Install Offline" |
PubSubClient | MQTT message subscription publishing library | v2.8.0 | "Install Online" or "Install Offline" |
NTPClient | Network time synchronization client library | v3.2.1 | "Install Online" or "Install Offline" |
File
-> New Sketch
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
}
void loop() {
// put your main code here, to run repeatedly:
Serial.println("Hello, World!");
delay(2000);
}
File
-> Save As...
. In the pop-up menu, select the path to save the project, and enter a project name, such as Hello_World, click Save
①. Click to select the dropdown menu option Select Other Board and Port;
②. Search for the required development board model esp32s3 dev module and select;
③. Select COM Port;
④. Save the selection.
①. Compile the program; ②. Compile and download the program; ③. Download successful.
Demo | Basic Description | Dependency Library |
---|---|---|
01_MAIN_WIFI_AP | RS485 interface control, Bluetooth control, Bluetooth send IP, Web page control (short distance) | Can be flashed directly Web pages are only available if they are connected to device WIFI |
02_MAIN_WIFI_STA | RS485 interface control, Bluetooth control, Bluetooth send IP, Web page control (short distance) | Need to modify the WIFI to be connected Web pages can only be used within the intranet |
03_MAIN_WIFI_MQTT | RS485 interface control, Bluetooth control, Bluetooth transmit IP, Waveshare cloud control (long distance) | Need to modify the WIFI to be connected The device must be created in the Waveshare cloud |
04_MAIN_ALL | RS485 interface control, Bluetooth control, Bluetooth send IP, Web page control (short distance), Waveshare cloud control (long distance) | Need to modify the WIFI to be connected The device must be created in the Waveshare cloud Web pages can only be used within the intranet |
Demo description
Precautions
Demo description
Precautions
Demo description
Precautions
Demo description
Precautions
Operation Command | Command Function |
06 01 | Switch the CH1 relay status of Modbus RTU Relay |
06 02 | Switch the CH2 relay status of Modbus RTU Relay |
06 03 | Switch the CH3 relay status of Modbus RTU Relay |
06 04 | Switch the CH4 relay status of Modbus RTU Relay |
06 05 | Switch the CH5 relay status of Modbus RTU Relay |
06 06 | Switch the CH6 relay status of Modbus RTU Relay |
06 07 | Switch the CH7 relay status of Modbus RTU Relay |
06 08 | Switch the CH8 relay status of Modbus RTU Relay |
06 09 | Turn on all relays of Modbus RTU Relay |
06 0A | Turn off all relays of Modbus RTU Relay |
..\ESP32-S3-Relay-1CH\Firmware\Factory bin
The product can be controlled online through the Homeassistant built on the Raspberry Pi, and the relevant operations can be found in Reference link
①View through Device Manager: Press the Windows + R keys to open the "Run" dialog box; input devmgmt.msc and press Enter to open the Device Manager; expand the "Ports (COM and LPT)" section, where all COM ports and their current statuses will be listed.
②Use the command prompt to view: Open the Command Prompt (CMD), enter the "mode" command, which will display status information for all COM ports.
③Check hardware connections: If you have already connected external devices to the COM port, the device usually occupies a port number, which can be determined by checking the connected hardware.
①Use the dmesg command to view: Open the terminal.
①Use the ls command to view: Enter ls /dev/ttyS* or ls /dev/ttyUSB* to list all serial port devices.
③Use the setserial command to view: Enter setserial -g /dev/ttyS* to view the configuration information of all serial port devices.
Monday-Friday (9:30-6:30) Saturday (9:30-5:30)
Email: services01@spotpear.com