Skip to main content

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.

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 NameBoard Installation RequirementVersion 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 NameDescriptionVersionLibrary Installation Requirement
FastLEDRGB LED driver libraryv3.10.1Via Library Manager or manual install

Installation Steps:

  1. Extract the downloaded example package.

  2. Copy all folders from its Arduino/libraries directory (FastLED, etc.) to the Arduino libraries folder.

    info

    The 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 libraries subfolder within this path.

  3. 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.

  1. Select the ESP32S3 Dev Module for ESP32-S3-RS485-WLED.
  2. Select the USB port.
  3. 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 an HWCDC object in your code to handle USB serial communication.

  4. Select 16MB Flash
  5. Select a Partition Table of the appropriate size

Example​

01_led_example​

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' or GPIO16'.
  • Connect the LED strip power to VOUT+ and VOUT-.

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