One button in the RemoteXY app turns an LED on GPIO 2 and the board's own RGB LED on and off over Bluetooth Low Energy. The app screen is made in the RemoteXY editor, so no app code is needed.
It is the smallest RemoteXY example I could make; the same kind of phone control is used in the ESP32-S3 Vehicle Warning System.
| The app (iPhone) | The board |
|---|---|
![]() |
![]() |
- ESP32-S3-DevKitC-1U-N8R8 (8 MB flash, 8 MB octal PSRAM), or another ESP32-S3 board
- an LED and a 220 Ω or 330 Ω resistor
- a phone with Bluetooth (Android or iPhone)
| Part | GPIO |
|---|---|
| LED + (through the resistor) | 2 |
| LED - | GND |
| On-board RGB LED (WS2812) | 38, nothing to wire |
Some ESP32-S3 boards have the RGB LED on GPIO 48. If it stays dark, change PIN_RGB_BUILTIN in src/main.cpp.
- Install VS Code (or VSCodium) with the PlatformIO extension, and the RemoteXY app on the phone.
- Clone this repo and open the folder in PlatformIO.
- Build and upload. PlatformIO installs the RemoteXY library (4.1.8 or newer) by itself.
platformio.ini is set up for the N8R8 board (octal PSRAM, 80 MHz flash, default 8 MB partitions). For a board with quad-SPI PSRAM (for example N8R2) or without PSRAM, change board_build.arduino.memory_type = qio_opi to qio_qspi, or remove that line.
- Switch on Bluetooth on the phone and open RemoteXY.
- Tap
+, then Bluetooth LE. - Pick
RemoteXY_BLE_LED_Controlfrom the list (no password). - Tap the button: LED ON lights the LED on GPIO 2 and turns the RGB LED green; LED OFF turns both off.
The serial monitor (115200 baud) shows >> Bluetooth Started. Waiting for App connection... after a reset.
iPhone: with Low Power Mode on, the connection can fail or the LED reacts late. Turn it off under Settings > Battery. On Android, Battery Saver made no difference.
-
Open the RemoteXY editor. Under Configuration choose Bluetooth BLE, ESP32 and Arduino IDE.
-
Drag buttons, sliders or text onto the phone screen. Each element gets a variable name, for example
pushSwitch_01; that is the name used inmain.cpp. -
Click Get source code and copy two parts into
src/main.cpp, replacing the old ones: the#pragma packblock withRemoteXY_CONF_PROGMEM, and thestruct { ... } RemoteXY;block.
Keep REMOTEXY_MODE__ESP32CORE_BLE and the Bluetooth name at the top of main.cpp. In loop() use RemoteXYEngine.delay() instead of delay(), so the Bluetooth connection keeps running.
docs/remotexy_original_backup.cpp is the code exactly as the editor generated it, before my changes.
src/main.cpp- the programplatformio.ini- board settings and the RemoteXY librarydocs/remotexy_original_backup.cpp- the unchanged code from the RemoteXY editorimg/- screenshots and the demo animations (hardware_demo_toggle.mp4is the board video as MP4)
main.cpp started from code generated by the RemoteXY editor, which comes under the MIT licence of the RemoteXY library.








