Arduino Nano ESP32 - DIYables Bluetooth App Monitor
Overview
This example implements a wireless serial monitor on the Arduino Nano ESP32 using BLE (Bluetooth Low Energy) via the DIYables Bluetooth STEM app. Stream real-time status messages, debug output, and sensor readings wirelessly to a smartphone, and receive text commands from the app. Suitable for wireless debugging, remote monitoring, and system logging.
Note: The Arduino Nano ESP32 supports BLE only — Classic Bluetooth is not supported. The DIYables Bluetooth App works on both Android and iOS with BLE.

Features
- Wireless Serial Monitor: Stream text messages to your smartphone
- Two-Way Communication: Send commands from the app to the Arduino
- Real-Time Streaming: Continuous output, similar to a wired Serial Monitor
- Command Handling: Process text commands received from the app
- Android & iOS Support: BLE is compatible with both platforms
- No Pairing Required: BLE connects without manual pairing
- Low Power: BLE consumes less power than Classic Bluetooth
Hardware Preparation
Or you can buy the following kits:
| 1 | × | DIYables Sensor Kit (30 sensors/displays) | |
| 1 | × | DIYables Sensor Kit (18 sensors/displays) |
Additionally, some of these links are for products from our own brand, DIYables .
Arduino Nano ESP32 Code
Detailed Instructions
- New to the Arduino Nano ESP32? Start with the Arduino Nano ESP32 getting started guide.
- Connect the Arduino Nano ESP32 to your computer via USB.
- Open Arduino IDE.
- Select the Arduino Nano ESP32 board and the correct COM port.
- Click the Libraries icon in the left sidebar.
- Search for "DIYables Bluetooth" and select the DIYables Bluetooth library by DIYables.
- Click Install.

- When prompted to install dependencies, click Install All.

BLE Code
- In Arduino IDE, open File Examples DIYables Bluetooth ArduinoBLE_Monitor, or paste the code into the editor.
- Click Upload to flash the sketch to the board.
- Open the Serial Monitor.
- The Serial Monitor output should look like:
Mobile App
Note: The DIYables Bluetooth App works on both Android and iOS with BLE. No manual pairing is required.
- Launch the DIYables Bluetooth App.
- On first launch, grant the following permissions:
- Nearby Devices (Android 12+) / Bluetooth (iOS) — required to scan and connect to Bluetooth devices
- Location (Android 11 and below only) — required by older Android versions to scan for BLE
- Ensure Bluetooth is enabled on your device.
- Tap Connect on the home screen. The app will scan for BLE devices.

- Tap "Arduino_Monitor" in the scan results.
- After connecting, return to the home screen and open the Monitor app.

Tap the settings icon on the home screen to show or hide apps. See the DIYables Bluetooth App User Manual for details.
- Status messages will stream in the monitor display.
- Type LED_ON in the input field and tap Send — the built-in LED on the Arduino Nano ESP32 will turn on, and the monitor will display a confirmation.

Now look back at the Serial Monitor on Arduino IDE. You will see:
Creative Customization - Adapt the Code to Your Project
Send Messages
Handle Incoming Commands
Use the onMonitorMessage() callback to receive and process commands typed in the Monitor app:
Add additional else if blocks for each command. For example, use RELAY_ON / RELAY_OFF to control a relay, or READ to trigger a sensor reading.
Programming Examples
Sensor Status Streaming
Event-Based Logging
Troubleshooting
Common Issues
1. Device not visible in the app
- Confirm the board is powered on and the sketch is uploaded
- Verify Bluetooth is enabled on your phone
- On Android 11 and below, enable Location services as well
2. No messages appearing in the app
- Confirm bluetoothMonitor.send() is being called
- Verify bluetoothServer.loop() is present in the main loop
- Check the connection in Serial Monitor
3. Messages are delayed
- Reduce the update interval for more frequent messages
- Avoid sending too many messages in rapid succession (BLE has bandwidth limits)
4. Commands from the app not received
- Confirm the onMonitorMessage callback is registered
- Check Serial Monitor for received command output
5. Connection drops frequently
- Reduce distance to the Arduino
- Ensure a stable USB power supply
6. Upload fails or board not recognized
- Install the latest Arduino Nano ESP32 board package via Board Manager
- Try a different USB cable or port
Project Ideas
- Wireless debug console
- Sensor data logger
- System health monitor
- Event notification system
- Remote command interface
Next Steps
After completing the Bluetooth Monitor example, explore:
- Bluetooth Chat — Interactive two-way messaging
- Bluetooth Table — Structured data display
- Bluetooth Plotter — Data visualization
- Multiple Bluetooth Apps — Combine monitor with other app widgets
Support
For additional help:
- Check the API Reference documentation
- Visit DIYables tutorials
- Arduino community forums