The Bluetooth Table example provides structured data display through the DIYables Bluetooth STEM app. Designed for Arduino UNO R4 WiFi using BLE (Bluetooth Low Energy) to display sensor readings, system status, and any data in a clean table format on your smartphone. Supports named rows with real-time value updates. Perfect for dashboards, system monitoring, and multi-sensor displays.
Note: The Arduino UNO R4 WiFi only supports BLE (Bluetooth Low Energy). It does not support Classic Bluetooth. The DIYables Bluetooth App supports both BLE and Classic Bluetooth on Android, and BLE on iOS. Since this board uses BLE, the app works on both Android and iOS.
Features
Named Rows: Define rows with labels (e.g., "Temperature", "Humidity")
Real-Time Updates: Push individual value updates efficiently
Structure Sync: Auto-send table structure on connection
Flexible Data: Display any string or numeric data
Up to 20 Rows: Support for multiple data fields
Works on Android & iOS: BLE is supported on both platforms
No Pairing Required: BLE auto-connects without manual pairing
Disclosure: Some of the links provided in this section are Amazon affiliate links. We may receive a commission for any purchases made through these links at no additional cost to you. Additionally, some of these links are for products from our own brand, DIYables .
Connect the Arduino UNO R4 WiFi board to your computer using a USB cable.
Launch the Arduino IDE on your computer.
Select Arduino UNO R4 WiFi board and the appropriate COM port.
Navigate to the Libraries icon on the left bar of the Arduino IDE.
Search "DIYables Bluetooth", then find the DIYables Bluetooth library by DIYables
Click Install button to install the library.
You will be asked for installing some other library dependencies
Click Install All button to install all library dependencies.
BLE Code
On Arduino IDE, Go to File Examples DIYables Bluetooth ArduinoBLE_Table example, or copy the above code and paste it to the editor of Arduino IDE
/* * DIYables Bluetooth Library - Bluetooth Table Example * Works with DIYables Bluetooth STEM app on Android and iOS * * This example demonstrates the Bluetooth Table feature: * - Display structured data in a two-column table * - Real-time value updates for each row * - Perfect for sensor dashboards and status displays * * Compatible Boards: * - Arduino UNO R4 WiFi * - Arduino Nano 33 BLE / BLE Sense * - Arduino Nano 33 IoT * - Arduino MKR WiFi 1010 * - Arduino Nano RP2040 Connect * - Any board supporting the ArduinoBLE library * * Setup: * 1. Upload the sketch to your Arduino * 2. Open Serial Monitor to see connection status * 3. Use DIYables Bluetooth App to connect and view the table * * Tutorial: https://diyables.io/bluetooth-app * Author: DIYables */#include <DIYables_BluetoothServer.h>#include <DIYables_BluetoothTable.h>#include <platforms/DIYables_ArduinoBLE.h>// BLE Configurationconst char* DEVICE_NAME = "Arduino_Table";const char* SERVICE_UUID = "19B10000-E8F2-537E-4F6C-D104768A1214";const char* TX_UUID = "19B10001-E8F2-537E-4F6C-D104768A1214";const char* RX_UUID = "19B10002-E8F2-537E-4F6C-D104768A1214";// Create Bluetooth instancesDIYables_ArduinoBLE bluetooth(DEVICE_NAME, SERVICE_UUID, TX_UUID, RX_UUID);DIYables_BluetoothServer bluetoothServer(bluetooth);// Create Table app instanceDIYables_BluetoothTable bluetoothTable;// Variables for demo dataunsignedlong lastUpdate = 0;constunsignedlong UPDATE_INTERVAL = 1000; // Update every secondint counter = 0;voidsetup() {Serial.begin(9600);while (!Serial);Serial.println("DIYables Bluetooth - Table Example");// Initialize Bluetooth server with platform-specific implementation bluetoothServer.begin();// Add table app to server bluetoothServer.addApp(&bluetoothTable);// Define table structure (add rows with attribute names) bluetoothTable.addRow("Temperature"); bluetoothTable.addRow("Humidity"); bluetoothTable.addRow("Pressure"); bluetoothTable.addRow("Counter"); bluetoothTable.addRow("Uptime"); bluetoothTable.addRow("Free Memory"); bluetoothTable.addRow("Status");Serial.print("Table rows defined: ");Serial.println(bluetoothTable.getRowCount());// Set up connection event callbacks bluetoothServer.setOnConnected([]() {Serial.println("Bluetooth connected!");// Send table structure bluetoothTable.sendTableStructure();// Send initial values updateTableValues(); }); bluetoothServer.setOnDisconnected([]() {Serial.println("Bluetooth disconnected!"); });// Optional: Handle requests for table data bluetoothTable.onDataRequest([]() {Serial.println("App requested table data"); bluetoothTable.sendTableStructure(); updateTableValues(); });Serial.println("Waiting for Bluetooth connection...");}void updateTableValues() {// TODO: Replace with actual sensor readings// Simulated temperature (20-30°C)float temperature = 20.0 + random(0, 100) / 10.0; bluetoothTable.sendValueUpdate("Temperature", String(temperature, 1) + " °C");// Simulated humidity (40-60%)int humidity = 40 + random(0, 21); bluetoothTable.sendValueUpdate("Humidity", String(humidity) + " %");// Simulated pressure (1000-1020 hPa)int pressure = 1000 + random(0, 21); bluetoothTable.sendValueUpdate("Pressure", String(pressure) + " hPa");// Counter value bluetoothTable.sendValueUpdate("Counter", String(counter)); counter++;// Uptime (in seconds)unsignedlong uptime = millis() / 1000;String uptimeStr = String(uptime / 3600) + "h " + String((uptime % 3600) / 60) + "m " + String(uptime % 60) + "s"; bluetoothTable.sendValueUpdate("Uptime", uptimeStr);// Free memory (simulated)int freeMemory = 2048 - random(0, 512); bluetoothTable.sendValueUpdate("Free Memory", String(freeMemory) + " bytes");// Status bluetoothTable.sendValueUpdate("Status", counter % 2 == 0 ? "Running" : "Active");// Alternative: Update by index instead of attribute name// bluetoothTable.sendValueUpdate(0, String(temperature, 1) + " °C");// bluetoothTable.sendValueUpdate(1, String(humidity) + " %");Serial.println("Table values updated");}voidloop() {// Handle Bluetooth server communications bluetoothServer.loop();// Update table values periodically (only when connected)if (bluetooth.isConnected() && millis() - lastUpdate >= UPDATE_INTERVAL) { lastUpdate = millis(); updateTableValues(); }delay(10);}
Click Upload button on Arduino IDE to upload code to Arduino UNO R4 WiFi
Open the Serial Monitor
Check out the result on Serial Monitor. It looks like the below:
Newbiely | Arduino IDE 2.3.8
──
☐
✕
File
Edit
Sketch
Tools
Help
Arduino Uno R4 WiFi
Newbiely.ino
···
8Serial.println("Hello World!");
Output
Serial Monitor
Message (Enter to send message to 'Arduino Uno R4 WiFi' on 'COM15')
New Line
9600 baud
DIYables Bluetooth - Table Example
Waiting for Bluetooth connection...
Ln 11, Col 1
Arduino Uno R4 WiFi on COM15
2
Mobile App
Install the DIYables Bluetooth App on your smartphone: Android | iOS
Note: The DIYables Bluetooth App supports both BLE and Classic Bluetooth on Android, and BLE on iOS. Since the Arduino UNO R4 WiFi uses BLE, the app works on both Android and iOS. No manual pairing is needed for BLE — just scan and connect.
Open the DIYables Bluetooth App
When opening the app for the first time, it will ask for permissions. Please grant the following:
Nearby Devices permission (Android 12+) / Bluetooth permission (iOS) - required to scan and connect to Bluetooth devices
Location permission (Android 11 and below only) - required by older Android versions to scan for BLE devices
Make sure Bluetooth is turned on on your phone
On the home screen, tap the Connect button. The app will scan for BLE devices.
Find and tap "Arduino_Table" in the scan results to connect.
Once connected, the app automatically goes back to the home screen. Select the Table app from the app menu.
Note: You can tap the settings icon on the home screen to hide/show apps on the home screen. For more details, see the DIYables Bluetooth App User Manual.
You will see a table with rows showing Temperature, Humidity, Pressure, Counter, Uptime, Free Memory, and Status — all updating in real time
Now look back at the Serial Monitor on Arduino IDE. You will see:
Newbiely | Arduino IDE 2.3.8
──
☐
✕
File
Edit
Sketch
Tools
Help
Arduino Uno R4 WiFi
Newbiely.ino
···
8Serial.println("Hello World!");
Output
Serial Monitor
Message (Enter to send message to 'Arduino Uno R4 WiFi' on 'COM15')
New Line
9600 baud
Bluetooth connected!
Sending table updates...
Temperature: 25.30 °C
Humidity: 55.70 %
Ln 11, Col 1
Arduino Uno R4 WiFi on COM15
2
Creative Customization - Adapt the Code to Your Project
// Update by row namebluetoothTable.sendValueUpdate("Temperature", "25.5 °C");bluetoothTable.sendValueUpdate("Status", "Running");// Update by row index (0-based)bluetoothTable.sendValueUpdate(0, "25.5 °C");bluetoothTable.sendValueUpdate(3, "Running");
Send Table Structure
// Re-send the full table structure to the appbluetoothTable.sendTableStructure();// Handle data request from appbluetoothTable.onDataRequest([]() { bluetoothTable.sendTableStructure();});
Please feel free to share the link of this tutorial. However, Please do not use our content on any other websites. We invested a lot of effort and time to create the content, please respect our work!