ESP32 - DIYables Bluetooth App Analog Gauge

Overview

The Bluetooth Analog Gauge example provides a classic analog meter-style display accessible through the DIYables Bluetooth STEM app. Designed for ESP32 boards with support for both BLE (Bluetooth Low Energy) and Classic Bluetooth connections. Send numeric values with configurable range and unit labels — perfect for speedometers, pressure gauges, voltage meters, and any application requiring an analog dial display.

This example supports two Bluetooth modes:

  • ESP32 BLE (Bluetooth Low Energy): Works on both Android and iOS
  • ESP32 Classic Bluetooth: Works on Android only. iOS does not support Classic Bluetooth. Use BLE if you need iOS support.
ESP32 Bluetooth Analog Gauge Example - Analog Gauge Display Tutorial

Features

  • Analog Gauge Display: Classic dial/meter-style visualization
  • Configurable Range: Set minimum and maximum values for the gauge
  • Custom Units: Display km/h, PSI, V, %, or any custom unit string
  • Real-Time Updates: Send live readings with smooth needle movement
  • Request Callback: App can request current value on demand
  • BLE & Classic Bluetooth: Choose the Bluetooth mode that suits your project
  • Cross-Platform: BLE mode works on both Android and iOS; Classic Bluetooth works on Android
  • Low Power Option: BLE mode consumes less power than Classic Bluetooth

Hardware Used In This Tutorial

1×ESP-WROOM-32 Dev Module
1×Alternatively, ESP32 Uno-form board
1×Alternatively, ESP32 S3 Uno-form board
1×USB Cable Type-A to Type-C (for USB-A PC)
1×USB Cable Type-C to Type-C (for USB-C PC)
1×Breadboard
1×Jumper Wires
1×Recommended: Screw Terminal Expansion Board for ESP32
1×Recommended: Breakout Expansion Board for ESP32
1×Recommended: Power Splitter for ESP32

Or you can buy the following kits:

1×DIYables ESP32 Starter Kit (ESP32 included)
1×DIYables Sensor Kit (18 sensors/displays)
Disclosure: Some of the links in this section are Amazon affiliate links, meaning we may earn a commission at no additional cost to you if you make a purchase through them. Additionally, some links direct you to products from our own brand, DIYables .

ESP32 Code

Quick Instructions

Follow these instructions step by step:

  • If this is your first time using the ESP32, refer to the tutorial on setting up the environment for ESP32 in the Arduino IDE.
  • Connect the ESP32 board to your computer using a USB cable.
  • Launch the Arduino IDE on your computer.
  • Select the appropriate ESP32 board and 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.
ESP32 DIYables Bluetooth library
  • You will be asked for installing some other library dependencies
  • Click Install All button to install all library dependencies.
ESP32 DIYables Bluetooth dependency

Choose one of the two Bluetooth modes below depending on your needs:

ESP32 Classic Bluetooth Code (works with app on Android only)

Note: Classic Bluetooth is NOT supported on iOS. If you need iOS support, use the BLE code below.

  • On Arduino IDE, Go to File Examples DIYables Bluetooth Esp32Bluetooth_AnalogGauge example, or copy the above code and paste it to the editor of Arduino IDE
/* * DIYables Bluetooth Library - ESP32 Classic Bluetooth Analog Gauge Example * Works with DIYables Bluetooth STEM app on Android * Note: Classic Bluetooth is NOT supported on iOS. Use BLE examples for iOS support. * * This example demonstrates the Bluetooth Analog Gauge feature: * - Display values on an analog meter/gauge * - Configurable range and unit * - Perfect for sensor monitoring (speed, pressure, voltage, etc.) * * Compatible Boards: * - ESP32 (all variants with Classic Bluetooth) * - ESP32-WROOM-32 * - ESP32-DevKitC * - ESP32-WROVER * * Note: Select "Huge APP (3MB No OTA/1MB SPIFFS)" partition scheme * in Arduino IDE: Tools > Partition Scheme * * Optional: Analog sensor (potentiometer, pressure sensor, etc.) * * Setup: * 1. Upload the sketch to your ESP32 * 2. Open Serial Monitor (115200 baud) to see connection status * 3. Use DIYables Bluetooth App to connect and view the gauge * * Tutorial: https://diyables.io/bluetooth-app * Author: DIYables */ #include <DIYables_BluetoothServer.h> #include <DIYables_BluetoothAnalogGauge.h> #include <platforms/DIYables_Esp32Bluetooth.h> // Create Bluetooth instances DIYables_Esp32Bluetooth bluetooth("ESP32_Gauge"); DIYables_BluetoothServer bluetoothServer(bluetooth); // Create Analog Gauge app instance (min=0, max=100, unit="km/h") DIYables_BluetoothAnalogGauge bluetoothGauge(0.0, 100.0, "km/h"); // Variables for gauge value float currentValue = 0.0; unsigned long lastUpdate = 0; const unsigned long UPDATE_INTERVAL = 200; // Update every 200ms // Optional: Analog input pin for sensor const int ANALOG_PIN = 34; // ESP32 ADC pin // Function to read sensor value float readSensorValue() { // TODO: Replace with actual sensor reading // Examples: // - Pressure sensor: readPressure() // - Voltage sensor: analogRead(34) * (3.3 / 4095.0) // - Speed sensor: calculateSpeed() // Option 1: Read from analog pin and map to gauge range // int rawValue = analogRead(ANALOG_PIN); // return map(rawValue, 0, 4095, 0, 100); // Option 2: Simulated data (sine wave) static float phase = 0; phase += 0.05; if (phase > 2 * PI) phase = 0; return 50 + 50 * sin(phase); // Oscillates between 0-100 } void setup() { Serial.begin(115200); delay(1000); Serial.println("DIYables Bluetooth - ESP32 Analog Gauge Example"); // Optional: Initialize analog pin // pinMode(ANALOG_PIN, INPUT); // Initialize Bluetooth server with platform-specific implementation bluetoothServer.begin(); // Add gauge app to server bluetoothServer.addApp(&bluetoothGauge); // Set up connection event callbacks bluetoothServer.setOnConnected([]() { Serial.println("Bluetooth connected!"); // Send initial value currentValue = readSensorValue(); bluetoothGauge.send(currentValue); Serial.print("Initial value sent: "); Serial.print(currentValue); Serial.print(" "); Serial.println(bluetoothGauge.getUnit()); }); bluetoothServer.setOnDisconnected([]() { Serial.println("Bluetooth disconnected!"); }); // Optional: Handle requests for current value bluetoothGauge.onValueRequest([]() { currentValue = readSensorValue(); bluetoothGauge.send(currentValue); Serial.print("Value requested - Sent: "); Serial.print(currentValue); Serial.print(" "); Serial.println(bluetoothGauge.getUnit()); }); // You can change gauge configuration at runtime: // bluetoothGauge.setRange(0.0, 200.0); // Change range to 0-200 // bluetoothGauge.setUnit("mph"); // Change unit to mph // bluetoothGauge.setRange(0.0, 3.3); // For voltage (0-3.3V on ESP32) // bluetoothGauge.setUnit("V"); Serial.println("Waiting for Bluetooth connection..."); Serial.print("Gauge range: "); Serial.print(bluetoothGauge.getMin()); Serial.print(" - "); Serial.print(bluetoothGauge.getMax()); Serial.print(" "); Serial.println(bluetoothGauge.getUnit()); } void loop() { // Handle Bluetooth server communications bluetoothServer.loop(); // Send gauge updates periodically (only when connected) if (bluetooth.isConnected() && millis() - lastUpdate >= UPDATE_INTERVAL) { lastUpdate = millis(); // Read sensor value currentValue = readSensorValue(); // Send to Bluetooth app bluetoothGauge.send(currentValue); // Print to Serial Monitor Serial.print("Gauge: "); Serial.print(currentValue, 1); Serial.print(" "); Serial.println(bluetoothGauge.getUnit()); } delay(10); }
  • Click Upload button on Arduino IDE to upload code to ESP32
  • Open the Serial Monitor
  • Check out the result on Serial Monitor. It looks like the below:
COM6
Send
DIYables Bluetooth - ESP32 Analog Gauge Example Waiting for Bluetooth connection...
Autoscroll Show timestamp
Clear output
9600 baud  
Newline  

ESP32 BLE Code (works with app on both Android and iOS)

  • On Arduino IDE, Go to File Examples DIYables Bluetooth Esp32BLE_AnalogGauge example, or copy the above code and paste it to the editor of Arduino IDE
/* * DIYables Bluetooth Library - ESP32 BLE Analog Gauge Example * Works with DIYables Bluetooth STEM app on Android and iOS * * This example demonstrates the Bluetooth Analog Gauge feature: * - Display values on an analog meter/gauge * - Configurable range and unit * - Perfect for sensor monitoring (speed, pressure, voltage, etc.) * * Compatible Boards: * - ESP32-WROOM-32 * - ESP32-DevKitC * - ESP32-WROVER * - ESP32-S3 * - ESP32-C3 * - Any ESP32 board supporting BLE * * Note: Select "Huge APP (3MB No OTA/1MB SPIFFS)" partition scheme * in Arduino IDE: Tools > Partition Scheme * * Optional: Analog sensor (potentiometer, pressure sensor, etc.) * * Setup: * 1. Upload the sketch to your ESP32 * 2. Open Serial Monitor (115200 baud) to see connection status * 3. Use DIYables Bluetooth App to connect and view the gauge * * Tutorial: https://diyables.io/bluetooth-app * Author: DIYables */ #include <DIYables_BluetoothServer.h> #include <DIYables_BluetoothAnalogGauge.h> #include <platforms/DIYables_Esp32BLE.h> // BLE Configuration const char* DEVICE_NAME = "ESP32BLE_Gauge"; 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 instances DIYables_Esp32BLE bluetooth(DEVICE_NAME, SERVICE_UUID, TX_UUID, RX_UUID); DIYables_BluetoothServer bluetoothServer(bluetooth); // Create Analog Gauge app instance (min=0, max=100, unit="km/h") DIYables_BluetoothAnalogGauge bluetoothGauge(0.0, 100.0, "km/h"); // Variables for gauge value float currentValue = 0.0; unsigned long lastUpdate = 0; const unsigned long UPDATE_INTERVAL = 200; // Update every 200ms // Optional: Analog input pin for sensor const int ANALOG_PIN = 34; // ESP32 ADC pin // Function to read sensor value float readSensorValue() { // TODO: Replace with actual sensor reading // Option 1: Read from analog pin and map to gauge range // int rawValue = analogRead(ANALOG_PIN); // return map(rawValue, 0, 4095, 0, 100); // ESP32 has 12-bit ADC // Option 2: Simulated data (sine wave) static float phase = 0; phase += 0.05; if (phase > 2 * PI) phase = 0; return 50 + 50 * sin(phase); // Oscillates between 0-100 } void setup() { Serial.begin(115200); delay(1000); Serial.println("DIYables Bluetooth - ESP32 BLE Analog Gauge Example"); // Initialize Bluetooth server with platform-specific implementation bluetoothServer.begin(); // Add gauge app to server bluetoothServer.addApp(&bluetoothGauge); // Set up connection event callbacks bluetoothServer.setOnConnected([]() { Serial.println("Bluetooth connected!"); currentValue = readSensorValue(); bluetoothGauge.send(currentValue); Serial.print("Initial value sent: "); Serial.print(currentValue); Serial.print(" "); Serial.println(bluetoothGauge.getUnit()); }); bluetoothServer.setOnDisconnected([]() { Serial.println("Bluetooth disconnected!"); }); bluetoothGauge.onValueRequest([]() { currentValue = readSensorValue(); bluetoothGauge.send(currentValue); Serial.print("Value requested - Sent: "); Serial.print(currentValue); Serial.print(" "); Serial.println(bluetoothGauge.getUnit()); }); Serial.println("Waiting for Bluetooth connection..."); Serial.print("Gauge range: "); Serial.print(bluetoothGauge.getMin()); Serial.print(" - "); Serial.print(bluetoothGauge.getMax()); Serial.print(" "); Serial.println(bluetoothGauge.getUnit()); } void loop() { bluetoothServer.loop(); if (bluetooth.isConnected() && millis() - lastUpdate >= UPDATE_INTERVAL) { lastUpdate = millis(); currentValue = readSensorValue(); bluetoothGauge.send(currentValue); Serial.print("Gauge: "); Serial.print(currentValue, 1); Serial.print(" "); Serial.println(bluetoothGauge.getUnit()); } delay(10); }
  • Click Upload button on Arduino IDE to upload code to ESP32
  • Open the Serial Monitor
  • Check out the result on Serial Monitor. It looks like the below:
COM6
Send
DIYables Bluetooth - ESP32 BLE Analog Gauge Example Waiting for Bluetooth connection...
Autoscroll Show timestamp
Clear output
9600 baud  
Newline  

Mobile App

  • Install the DIYables Bluetooth App on your smartphone: Android | iOS
  • If you are using the ESP32 Classic Bluetooth code, you need to pair the ESP32 with your Android phone before opening the app:
    • Go to your phone's Settings > Bluetooth
    • Make sure Bluetooth is turned on
    • Your phone will scan for available devices
    • Find and tap "ESP32_Gauge" in the list of available devices
    • Confirm the pairing request (no PIN required)
    • Wait until it shows "Paired" under the device name
  • If you are using the ESP32 BLE code, no pairing is needed. Just proceed to the next step.
  • 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 both BLE and Classic Bluetooth devices.
DIYables Bluetooth App - Home Screen with Scan Button
  • Find and tap your device in the scan results to connect:
    • For Classic Bluetooth: tap "ESP32_Gauge"
    • For BLE: tap "ESP32BLE_Gauge"
  • Once connected, the app automatically goes back to the home screen. Select the Analog Gauge app from the app menu.
DIYables Bluetooth App - Home Screen with Analog Gauge App

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.

  • The analog gauge will display the current value with a moving needle
DIYables Bluetooth App - Analog Gauge Screen

Now look back at the Serial Monitor on Arduino IDE. You will see:

COM6
Send
Bluetooth connected! Gauge value: 50.0 km/h Gauge value: 75.0 km/h Gauge value: 93.3 km/h Gauge value: 100.0 km/h
Autoscroll Show timestamp
Clear output
9600 baud  
Newline  
  • Watch the gauge needle move in real time in the app

Creative Customization - Adapt the Code to Your Project

Configure Gauge Range and Unit

Set the display range and unit:

// Constructor: DIYables_BluetoothAnalogGauge(min, max, unit) DIYables_BluetoothAnalogGauge bluetoothGauge(0.0, 100.0, "km/h"); // Change range at runtime bluetoothGauge.setRange(0.0, 200.0); // Change unit bluetoothGauge.setUnit("MPH"); // Read current configuration float minVal = bluetoothGauge.getMin(); // Returns 0.0 float maxVal = bluetoothGauge.getMax(); // Returns 100.0 String unit = bluetoothGauge.getUnit(); // Returns "km/h"

Send Gauge Value

// Send current reading float speed = 72.5; bluetoothGauge.send(speed); // Send text message bluetoothGauge.send("Calibrating...");

Handle Value Requests from App

bluetoothGauge.onValueRequest([]() { float currentValue = readSensor(); bluetoothGauge.send(currentValue); Serial.println("App requested value: " + String(currentValue)); });

Handle Connection Events

bluetoothServer.setOnConnected([]() { Serial.println("Bluetooth connected!"); bluetoothGauge.send(currentValue); // Send current reading }); bluetoothServer.setOnDisconnected([]() { Serial.println("Bluetooth disconnected!"); });

How to Use the Analog Gauge

App Interface

The analog gauge interface in the DIYables Bluetooth App shows:

  • Dial/Needle: Classic analog meter with moving needle
  • Numeric Display: Shows exact current value
  • Unit Label: Displays the configured unit string
  • Scale Markings: Shows graduated scale from min to max

Common Unit Configurations

  • Speed: DIYables_BluetoothAnalogGauge(0.0, 200.0, "km/h")
  • Pressure: DIYables_BluetoothAnalogGauge(0.0, 100.0, "PSI")
  • Voltage: DIYables_BluetoothAnalogGauge(0.0, 5.0, "V")
  • Percentage: DIYables_BluetoothAnalogGauge(0.0, 100.0, "%")
  • RPM: DIYables_BluetoothAnalogGauge(0.0, 8000.0, "RPM")

Programming Examples

Voltage Meter

const int VOLTAGE_PIN = 34; const float VREF = 3.3; const float DIVIDER_RATIO = 5.0; // Voltage divider ratio // Gauge configured for 0-16V range DIYables_BluetoothAnalogGauge bluetoothGauge(0.0, 16.0, "V"); void loop() { bluetoothServer.loop(); static unsigned long lastUpdate = 0; if (millis() - lastUpdate >= 500) { lastUpdate = millis(); int raw = analogRead(VOLTAGE_PIN); float voltage = (raw / 4095.0) * VREF * DIVIDER_RATIO; bluetoothGauge.send(voltage); Serial.println("Voltage: " + String(voltage, 2) + " V"); } delay(10); }

Pressure Gauge (BMP280)

#include <Adafruit_BMP280.h> Adafruit_BMP280 bmp; // Gauge configured for atmospheric pressure range DIYables_BluetoothAnalogGauge bluetoothGauge(900.0, 1100.0, "hPa"); void setup() { Serial.begin(115200); bmp.begin(0x76); // ... Bluetooth setup ... bluetoothGauge.onValueRequest([]() { float pressure = bmp.readPressure() / 100.0; // Pa to hPa bluetoothGauge.send(pressure); }); } void loop() { bluetoothServer.loop(); static unsigned long lastUpdate = 0; if (millis() - lastUpdate >= 1000) { lastUpdate = millis(); float pressure = bmp.readPressure() / 100.0; bluetoothGauge.send(pressure); Serial.println("Pressure: " + String(pressure, 1) + " hPa"); } delay(10); }

Current Sensor (ACS712)

const int CURRENT_PIN = 34; const float SENSITIVITY = 0.185; // ACS712-05B: 185mV/A const float ZERO_CURRENT_VOLTAGE = 2.5; // Gauge configured for 0-5A range DIYables_BluetoothAnalogGauge bluetoothGauge(0.0, 5.0, "A"); void loop() { bluetoothServer.loop(); static unsigned long lastUpdate = 0; if (millis() - lastUpdate >= 200) { lastUpdate = millis(); int raw = analogRead(CURRENT_PIN); float voltage = (raw / 4095.0) * 3.3; float current = abs((voltage - ZERO_CURRENT_VOLTAGE) / SENSITIVITY); bluetoothGauge.send(current); Serial.println("Current: " + String(current, 2) + " A"); } delay(10); }

Speed from Encoder

volatile unsigned long pulseCount = 0; const int ENCODER_PIN = 2; const float PULSES_PER_REV = 20.0; const float WHEEL_CIRCUMFERENCE = 0.628; // meters (20cm diameter) DIYables_BluetoothAnalogGauge bluetoothGauge(0.0, 50.0, "km/h"); void IRAM_ATTR countPulse() { pulseCount++; } void setup() { Serial.begin(115200); pinMode(ENCODER_PIN, INPUT_PULLUP); attachInterrupt(digitalPinToInterrupt(ENCODER_PIN), countPulse, RISING); // ... Bluetooth setup ... } void loop() { bluetoothServer.loop(); static unsigned long lastCalc = 0; if (millis() - lastCalc >= 500) { unsigned long elapsed = millis() - lastCalc; lastCalc = millis(); noInterrupts(); unsigned long count = pulseCount; pulseCount = 0; interrupts(); float revPerSec = (count / PULSES_PER_REV) / (elapsed / 1000.0); float speedKmh = revPerSec * WHEEL_CIRCUMFERENCE * 3.6; bluetoothGauge.send(speedKmh); Serial.println("Speed: " + String(speedKmh, 1) + " km/h"); } delay(10); }

Advanced Programming Techniques

Smooth Needle Movement

float displayValue = 0; float targetValue = 0; const float SMOOTHING = 0.1; // 0.0-1.0, lower = smoother void loop() { bluetoothServer.loop(); static unsigned long lastUpdate = 0; if (millis() - lastUpdate >= 50) { // 20 FPS lastUpdate = millis(); targetValue = readSensor(); displayValue += (targetValue - displayValue) * SMOOTHING; bluetoothGauge.send(displayValue); } delay(5); }

Peak Hold

float peakValue = 0; unsigned long peakTime = 0; const unsigned long PEAK_HOLD_MS = 3000; // Hold peak for 3 seconds void updateWithPeakHold(float value) { if (value > peakValue) { peakValue = value; peakTime = millis(); } if (millis() - peakTime > PEAK_HOLD_MS) { peakValue = value; // Reset peak } // Send the higher of current or peak bluetoothGauge.send(max(value, peakValue)); }

Range Auto-Scaling

float autoMin = 0; float autoMax = 100; void autoScale(float value) { bool changed = false; if (value < autoMin) { autoMin = value - 10; changed = true; } if (value > autoMax) { autoMax = value + 10; changed = true; } if (changed) { bluetoothGauge.setRange(autoMin, autoMax); } bluetoothGauge.send(value); }

Hardware Integration Ideas

Analog Sensors

Any sensor with analog output can drive the gauge: potentiometers, force sensors, flex sensors, and more.

I2C/SPI Sensors

Use I2C sensors like BMP280 (pressure), INA219 (current/power), or SPI sensors for high-speed measurement.

Pulse/Frequency Sensors

Speed encoders, flow meters, and RPM sensors using interrupt-based counting.

Load Cells (HX711)

Weight measurement with the HX711 amplifier for kitchen scales or industrial weighing.

BLE vs Classic Bluetooth - Which to Choose?

FeatureBLE (Esp32BLE_AnalogGauge)Classic Bluetooth (Esp32Bluetooth_AnalogGauge)
iOS Support? Yes? No
Android Support? Yes? Yes
Power ConsumptionLowHigher
Range~30-100m~10-100m
Data RateLowerHigher
Pairing RequiredNo (auto-connect)Yes (manual pairing)
Best ForBattery-powered, cross-platformHigh throughput, Android-only

Troubleshooting

Common Issues

1. Cannot find the device in the app

  • Make sure the ESP32 is powered on and the sketch is uploaded
  • For BLE: Ensure your phone's Bluetooth and Location are enabled
  • For Classic Bluetooth: Pair the device first in phone's Bluetooth settings
  • Check that the correct partition scheme is selected (Huge APP)

2. Gauge shows 0 or incorrect value

  • Verify sensor wiring and connections
  • Check sensor reading with Serial Monitor first
  • Ensure the value is within the configured range
  • Verify unit and range configuration in constructor

3. Gauge needle not moving smoothly

  • Increase the update frequency (smaller interval in millis() check)
  • Apply smoothing/filtering to sensor readings
  • Check for sensor noise or unstable readings

4. Values outside gauge range

  • Adjust range with setRange(min, max) to match your sensor output
  • Values outside the range will show but may clip at min/max
  • Consider auto-scaling for unknown ranges

5. Connection drops frequently

  • Move closer to the ESP32 (reduce distance)
  • For BLE: Check for interference from other BLE devices
  • For Classic Bluetooth: Ensure stable power supply to ESP32

6. Sketch too large / not enough space

  • In Arduino IDE, go to Tools > Partition Scheme and select "Huge APP (3MB No OTA/1MB SPIFFS)" or "No OTA (Large APP)"
  • The default partition scheme only provides ~1.2MB for app code, which is not enough for Bluetooth libraries
  • This setting gives ~3MB by sacrificing the OTA (over-the-air update) partition

Debug Tips

Add comprehensive debugging:

void debugGauge(float value) { Serial.println("=== Gauge Debug ==="); Serial.println("Value: " + String(value, 2) + " " + bluetoothGauge.getUnit()); Serial.println("Range: " + String(bluetoothGauge.getMin(), 1) + " - " + String(bluetoothGauge.getMax(), 1)); Serial.println("In Range: " + String(value >= bluetoothGauge.getMin() && value <= bluetoothGauge.getMax() ? "Yes" : "No")); float percentage = (value - bluetoothGauge.getMin()) / (bluetoothGauge.getMax() - bluetoothGauge.getMin()) * 100.0; Serial.println("Percentage: " + String(percentage, 1) + "%"); Serial.println("==================="); }

Project Ideas

Vehicle & Motion

  • Speedometer for RC car or bicycle
  • RPM tachometer for motors
  • G-force meter for acceleration
  • Tilt angle indicator

Electrical & Power

  • Voltmeter (battery voltage monitor)
  • Ammeter (current consumption)
  • Wattmeter (power usage)
  • Battery level gauge

Environmental

  • Barometric pressure gauge
  • Wind speed (anemometer)
  • UV index meter
  • Sound level meter (dB)

Industrial

  • Weight scale display
  • Flow rate meter
  • Tank level indicator
  • Torque meter

Integration with Other Bluetooth Apps

Combine with Bluetooth Temperature

Gauge for one metric, temperature for another:

// Gauge shows pressure bluetoothGauge.send(pressure); // Temperature shows temperature bluetoothTemperature.send(temperature);

Combine with Bluetooth Table

Gauge for visual, table for details:

float speed = readSpeed(); bluetoothGauge.send(speed); bluetoothTable.sendValueUpdate("Speed", String(speed, 1) + " km/h"); bluetoothTable.sendValueUpdate("Distance", String(totalDistance, 2) + " km"); bluetoothTable.sendValueUpdate("Max Speed", String(maxSpeed, 1) + " km/h"); bluetoothTable.sendValueUpdate("Avg Speed", String(avgSpeed, 1) + " km/h");

Next Steps

After mastering the Bluetooth Analog Gauge example, try:

  1. Bluetooth Temperature - For dedicated temperature display
  2. Bluetooth Plotter - For trend visualization over time
  3. Bluetooth Table - For structured multi-value display
  4. Multiple Bluetooth Apps - Combining gauge with other displays

Support

For additional help:

※ OUR MESSAGES