A beginner-friendly project for controlling the ESP32-S3-DevKitC-1U (N8R8) using Bluetooth Low Energy (BLE) and the RemoteXY mobile app.
This project demonstrates how to:
- Configure PlatformIO for the N8R8 (8MB Flash / 8MB PSRAM) module.
- Create a Mobile GUI (Switch & Indicators) without writing app code.
- Control the Built-in RGB LED (NeoPixel) and an External LED simultaneously.
Here you can see the system in action.
- Left: The RemoteXY iOS App controlling the device.
- Right: The Physical ESP32-S3 and LED responding instantly.
| App View (iOS) | Hardware View |
|---|---|
![]() |
![]() |
- Development Board: Espressif ESP32-S3-DevKitC-1U-N8R8 (or similar S3 board).
- External LED: Any standard LED (Red/Blue/Green).
- Resistor: 220Ω or 330Ω (for the external LED).
- Smartphone: Android or iOS with Bluetooth support.
| Component | ESP32-S3 Pin | Note |
|---|---|---|
| Built-in RGB LED | GPIO 38 |
Addressable NeoPixel (WS2812). Logic is handled by neopixelWrite. |
| External LED (+) | GPIO 2 |
Connect via resistor. |
| External LED (-) | GND |
Common ground. |
Note: Different ESP32-S3 boards may use different pins for the built-in RGB LED (e.g., GPIO 48). If yours does not light up, check your board's datasheet and update
PIN_RGB_BUILTINinmain.cpp.
Here is an overview of the files in this project to help you navigate the code.
ESP32-S3_RemoteXY_BLE_LED_Control/
├── docs/
│ └── remotexy_original_backup.cpp # Backup of the raw code from RemoteXY editor
├── img/
│ ├── app_01_homescreen.png # Tutorial: App Home
│ ├── app_02_main_menu.png # Tutorial: Main Menu
│ ├── app_03_add_device.png # Tutorial: Add Device
│ ├── app_04_scan_list.png # Tutorial: Scan List
│ ├── app_05_connecting.png # Tutorial: Connecting
│ ├── app_06_switch_off.png # Tutorial: UI Off State
│ ├── app_07_switch_on.png # Tutorial: UI On State
│ ├── app_demo_ios.gif # Animation: App Walkthrough
│ ├── hardware_demo.gif # Animation: Hardware Response
│ ├── hardware_demo_toggle.mp4 # Raw Video: Hardware Response
│ ├── remotexy_01_config.png # Screenshot: Editor settings
│ ├── remotexy_02_editor.png # Screenshot: GUI design
│ └── remotexy_03_code.png # Screenshot: Generated code
├── platformio.ini # (CRITICAL) Project configuration file
├── src/
│ └── main.cpp # (MAIN) The actual source code (Setup, Loop)
└── README.md # This documentation file
- VSCodium or VS Code.
- PlatformIO extension installed.
- RemoteXY App installed on your phone.
- Clone the repo:
git clone [https://github.com/welton5532/ESP32-S3_RemoteXY_BLE_LED_Control.git](https://github.com/welton5532/ESP32-S3_RemoteXY_BLE_LED_Control.git)
- Open in PlatformIO: Open VSCodium, go to the PlatformIO Home, and click "Open Project". Select this folder.
- Upload: Connect your ESP32-S3 via USB. Click the Right Arrow (→) icon in the bottom status bar to Build and Upload.
- Open the RemoteXY app on your phone.
- Enable Bluetooth on your phone.
- Tap
+(New Device) ->Bluetooth BLE. - Select "RemoteXY_BLE_LED_Control" from the list.
- Toggle the switch on the screen.
- ON: External LED turns ON, Built-in RGB turns GREEN.
- OFF: Both LEDs turn OFF.
This project uses RemoteXY, a platform that allows you to create a mobile interface (GUI) for your microcontroller using a drag-and-drop editor.
If you want to modify this project (e.g., add a slider or change colors), follow these steps:
- Go to the RemoteXY Editor.
- Open the Configuration menu on the left.
- Select the following settings to match this project:
- Connection:
Bluetooth BLE - Board:
ESP32(Select "ESP32 on board" or "ESP32-S3" if available) - IDE:
Arduino IDE
- Connection:
- Drag and Drop: Use the left sidebar to drag components like Switch, LED, or Text onto the phone screen area.
- Properties: Click on any component to see its properties on the right.
- Variable Names: Note the variable name (e.g.,
pushSwitch_01). This is the name you will use in your C++ code to read the button state.
- Click the green "Get Source Code" button in the top right.
- A popup will appear containing the generated C++ code.
- Copy only:
- The
#pragma pack...block (The Configuration Array). - The
struct { ... } RemoteXY;block (The Variables).
- The
- Paste these into your
main.cpp, replacing the existing configuration blocks.
Bluetooth behavior varies significantly between operating systems when "Power Saving" modes are active.
If you are using an iPhone, you may experience connection failures or significant lag/delay when toggling the LED.
- Reason: iOS "Low Power Mode" aggressively restricts Bluetooth background activity and reduces data polling rates.
- Solution: Disable Low Power Mode (
Settings->Battery) for a smooth experience.
- Status: Generally Stable.
- Android's "Battery Saver" mode typically allows BLE connections to function normally without noticeable lag for this type of application.
This project is specifically configured for the ESP32-S3-WROOM-1U-N8R8 module which uses Octal SPI (OPI) for PSRAM.
If you use a standard S3 board (N8R2 or no PSRAM), you may need to edit platformio.ini:
- Change:
board_build.arduino.memory_type = qio_opi➔qio_qspi(or remove it).
This project uses the RemoteXY library. Please refer to the RemoteXY License.




