Working with Arduino
This chapter includes the following sections. Please read as needed:
Arduino Getting Started
New to Arduino ESP32 development and looking for a quick start? We have prepared a comprehensive Getting Started Tutorial for you.
- Section 0: Getting to Know ESP32
- Section 1: Installing and Configuring Arduino IDE
- Section 2: Arduino Basics
- Section 3: Digital Output/Input
- Section 4: Analog Input
- Section 5: Pulse Width Modulation (PWM)
- Section 6: Serial Communication (UART)
- Section 7: I2C Communication
- Section 8: SPI Communication
- Section 9: Wi-Fi Basics
- Section 10: Web Server
- Section 11: Bluetooth
- Section 12: LVGL GUI Development
- Section 13: Comprehensive Project
Note: This tutorial uses the ESP32-S3-Zero as a reference example, and all hardware code is based on its pinout. Before you start, we recommend checking the pinout of your development board to ensure the pin configuration is correct.
Setting Up the Development Environment
1. Install and Configure the Arduino IDE
Please refer to the tutorial Install and Configure Arduino IDE to download and install the Arduino IDE and add ESP32 support.
ESP32-S3-RS485-WLED required development board installation description
| Board Name | Board Installation Requirement | Version Requirement |
|---|---|---|
| esp32 by Espressif Systems | "Offline installation" / "Online installation" | 3.2.0 |
2. Installing Libraries
- When installing Arduino libraries, there are typically two options: Online Installation and Offline Installation. ** If the library installation requires offline installation, you must use the provided library files.**
For most libraries, users can easily search and install them via the Arduino software's built-in Library Manager. However, some open-source or custom libraries are not synchronized to the Arduino Library Manager, so they cannot be found through online search. In this case, you can only install these libraries manually offline. - For library installation instructions, refer to: Arduino Library Management Tutorial.
- The ESP32-S3-RS485-WLED library files are stored in the example program. Click here to go to: ESP32-S3-RS485-WLED Example.
Library installation instructions for ESP32-S3-RS485-WLED
| Library Name | Description | Version | Library Installation Requirement |
|---|---|---|---|
| FastLED | RGB LED driver library | v3.10.1 | Via Library Manager or manual install |
Installation Steps:
-
Extract the downloaded example package.
-
Copy all folders from its
Arduino/librariesdirectory (FastLED, etc.) to the Arduino libraries folder.infoThe path to the Arduino libraries folder is typically:
c:/Users/<username>/Documents/Arduino/libraries.You can also locate it in the Arduino IDE by going to File > Preferences and checking the "Sketchbook location". The libraries folder is the
librariessubfolder within this path. -
For other installation methods, please refer to: Arduino Library Management Tutorial.
3. Additional Tips
You need to select and configure the development board for ESP32-S3-RS485-WLED.

- Select the ESP32S3 Dev Module for ESP32-S3-RS485-WLED.
- Select the USB port.
- The ESP32-S3-RS485-WLED uses the ESP32-S3 native USB interface, not a UART-to-USB bridge. For serial communication:
-
The
printf()function can be used directly; -
To use the
Serial.println()function, additional configuration is required: Enable the "USB CDC On Boot" option in the IDE's Tools menu, or declare anHWCDCobject in your code to handle USB serial communication.
-
- Select 16MB Flash
- Select a Partition Table of the appropriate size
Example
01_led_example
- This example demonstrates three LED strip driving examples
- WS2812: RGB-27-5V-160D
- RGBWC: RGBWC-150-24V-IP65-1428D
- PWM: 4000K-20-12V-480D
Notes
- The external power supply voltage must match the rated voltage of the LED strip.
Hardware Connection
- Connect the LED strip data line to
GPIO2'orGPIO16'. - Connect the LED strip power to
VOUT+andVOUT-.
Expected Behavior
- The LED strip displays colors according to the program settings.
02_MAIN_WIFI_AP
- This example implements control of RS485, the LED strip, and audio capture and playback via Wi-Fi. This example enables the Wi-Fi AP mode.
Notes
- The Web page can only be used when connected to the device's Wi-Fi.
Web Page Control
- Connect to the Wi-Fi of the ESP32-S3-RS485-WLED device. The Wi-Fi name is ESP32-S3-RS485-WLED, and the password is 12345678.
- After a successful connection, open the web page
192.168.4.1. - Open the Web page to control RS485. (After the device is powered on, it takes a short time to configure. The first time the Web page is opened after each power-on may be slow.)
Expected Behavior
- Web page control
