ESP32 UNO - DIYables Bluetooth App Slider

Overview

Turn your phone into a two-fader control desk for the ESP32 Uno Bluetooth slider project. Drag a fader in the DIYables Bluetooth STEM app, and the ESP32 Uno form board gets a number from 0 to 100 at once. Feed that number to a PWM pin to fade an LED, spin a fan faster or swing a servo arm. The link runs as a BLE slider on Android and iPhone, or as a Classic Bluetooth slider on Android.

By the end, you can:

  1. Install the DIYables Bluetooth library in Arduino IDE
  2. Flash a BLE or a Classic Bluetooth slider sketch to the ESP32 Uno
  3. Link the phone app and read both fader values in the Serial Monitor
  4. Change the fader range and step size from code
  5. Turn the values into LED brightness, servo angle and motor speed
ESP32 Uno Bluetooth slider

※ NOTE THAT:

The ESP32 Uno carries two Bluetooth radios in one chip: BLE and Classic Bluetooth. Choose BLE when an iPhone has to connect or when you want to skip pairing. Choose Classic when every phone is Android and you like the older serial-style link.

What the Slider App Gives You

This table lists what the app does for you and what is left for your sketch.

Feature Details
Faders Two separate faders, each one drives its own output
Default scale 0 to 100 with a step of 1
Custom scale New minimum, maximum and step from code, also while the sketch runs
Speed A fresh value arrives as soon as your finger moves
PWM fit One map() call turns 0 to 100 into the 0 to 255 duty of analogWrite()
Number display The app prints the current value next to each fader
Radio modes BLE for Android and iOS, Classic Bluetooth for Android only
Power BLE draws less current than Classic Bluetooth

Components You Need

1×ESP32 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)
2×(optional) LED
1×Alternatively, Button and LED Kit
2×(optional) 220 ohm Resistor
2×(optional) Servo Motor
1×Breadboard
1×Jumper Wires

Or you can buy the following kits:

1×DIYables Sensor Kit (18 sensors/displays)
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 .

Buy Note: For controlling multiple servo motors, use the PCA9685 16 Channel PWM Servo Driver Module to save MCU pins and simplify wiring.

ESP32 Uno Pinout

The printed Uno labels (D9, D10…) are not what your code uses. Look up each label on this map and copy its GPIO number into the sketch.

ESP32 Uno pinout diagram

How to Connect the Optional LEDs

When this part is done, two LEDs show the PWM output of the two faders. The board alone is enough for the first test, so you can skip the LEDs.

LED Pin ESP32 Uno Pin
LED 1 long leg (+), through a 220 ohm resistor D9 (GPIO13)
LED 2 long leg (+), through a 220 ohm resistor D10 (GPIO5)
Short leg (-) of both LEDs GND

Good to know: ESP32 Uno pins give 3.3V, not 5V, so an LED looks a little less bright than on a 5V board.

WARNING

The chip uses D10 (GPIO5) as a boot strapping pin and checks its level at power-on. A plain LED with a 220 ohm resistor does not cause trouble, but if the board refuses to start or to take an upload, pull the wire off D10, upload, and plug it back in.

Upload and Test the ESP32 Uno Code

At the end of this part, the faders on your phone drive the board.

Step 1 — Prepare Arduino IDE

  1. First time with this board? Set it up with ESP32 Uno - Getting Started before you continue.
  2. Build the circuit by following the wiring table above. For a quick test, leave every pin free.
  3. Plug in the USB Type-C cable between the ESP32 Uno and your computer.
  4. Select the board in Arduino IDE: pick ESP32 Dev Module and the COM port of the board (CH340).
  5. Give the sketch more flash: open Tools > Partition Scheme and choose Huge APP (3MB No OTA/1MB SPIFFS). The Bluetooth stack does not fit in the standard 1.2 MB app area.
  6. Open Library Manager: click the Libraries icon in the left bar.
  7. Type "DIYables Bluetooth" in the search box and find the entry by DIYables.
  8. Press Install.
  • Search for DIYables Bluetooth created by DIYables and click the Install button.
∞
Newbiely | Arduino IDE 2.3.8
──
☐
✕
File
Edit
Sketch
Tools
Help
ESP32 Dev Module
Library Manager
Type:
All
Topic:
All
DIYables Bluetooth by DIYables
A comprehensive Bluetooth library that connects Arduino to the DIYables Bluetooth STEM mobile app (Android & iOS) via BLE and Classic Bluetooth. Features 11 built-in apps: Monitor, Chat, Digital Pin Control, Joystick, Sliders, Plotter, Analog Gauge, Rotator, Temperature, RTC, and Data Table. Clean architecture with platform abstraction. Works with Arduino Uno R4 WiFi, Arduino Nano 33 BLE, ESP32, and other BLE-capable boards. No mobile coding required. More info
1.0.1
INSTALL
Newbiely.ino
···
1 void setup() {
Output
Serial Monitor
Ln 1, Col 1
ESP32 Dev Module on COM15
1
  1. Take the helpers too: a pop-up lists extra libraries. Press Install All.

Next, flash ONE of the two sketches. They give the same faders; only the radio differs.

Step 2 — Option A: ESP32 Uno Classic Bluetooth Sketch (Android only)

Good to know: Classic Bluetooth is not available on iPhones. iOS users go straight to Option B.

  1. Open the sketch: in Arduino IDE choose File Examples DIYables Bluetooth Esp32Bluetooth_Slider, or paste the code below into an empty sketch.
/* * This ESP32 Uno code was developed by newbiely.com * * This ESP32 Uno code is made available for public use without any restriction * * For comprehensive instructions and wiring diagrams, please visit: * https://newbiely.com/tutorials/esp32-uno/esp32-uno-diyables-bluetooth-app-slider */ /* * DIYables Bluetooth Library - ESP32 Uno Classic Bluetooth Slider Example * Talks to the DIYables Bluetooth STEM app on Android phones * Note: iPhones have no Classic Bluetooth. Load the BLE sketch for iOS. * * What this sketch shows (Bluetooth Slider): * - Two sliders in the app send a number from 0 to 100 * - Both sliders work on their own * - Range and step size can be changed in code * * Board: ESP32 Uno form board (Classic Bluetooth radio) * * Note: in Arduino IDE pick Tools > Partition Scheme > * "Huge APP (3MB No OTA/1MB SPIFFS)", the Bluetooth stack is big * * How to use: * 1. Upload this sketch to the ESP32 Uno * 2. Open the Serial Monitor at 115200 baud to follow the link status * 3. Connect with the DIYables Bluetooth App and drag the sliders * * Tutorial: https://diyables.io/bluetooth-app * Author: DIYables */ #include <DIYables_BluetoothServer.h> #include <DIYables_BluetoothSlider.h> #include <platforms/DIYables_Esp32Bluetooth.h> // Classic Bluetooth link with the name shown on the phone, plus the app server DIYables_Esp32Bluetooth bluetooth("ESP32_Slider"); DIYables_BluetoothServer bluetoothServer(bluetooth); // slider app: lowest 0, highest 100, step 1 DIYables_BluetoothSlider bluetoothSlider(0, 100, 1); // last positions received from the app int currentSlider1 = 0; int currentSlider2 = 0; // two PWM outputs, e.g. for two dimmable LEDs const int PWM_PIN_1 = 13; // D9 (GPIO13) const int PWM_PIN_2 = 5; // D10 (GPIO5), boot strapping pin // LEDC channel numbers used by the two outputs const int PWM_CHANNEL_1 = 0; const int PWM_CHANNEL_2 = 1; void setup() { Serial.begin(115200); delay(1000); Serial.println("DIYables Bluetooth - ESP32 Slider Example"); // LEDC PWM: 5 kHz, 8-bit duty (0-255), one channel per pin ledcSetup(PWM_CHANNEL_1, 5000, 8); ledcSetup(PWM_CHANNEL_2, 5000, 8); ledcAttachPin(PWM_PIN_1, PWM_CHANNEL_1); ledcAttachPin(PWM_PIN_2, PWM_CHANNEL_2); // start the Bluetooth server bluetoothServer.begin(); // register the slider app on the server bluetoothServer.addApp(&bluetoothSlider); // runs when the phone links up bluetoothServer.setOnConnected([]() { Serial.println("Bluetooth connected!"); // put the app sliders at the stored positions bluetoothSlider.send(currentSlider1, currentSlider2); }); // runs when the phone drops the link bluetoothServer.setOnDisconnected([]() { Serial.println("Bluetooth disconnected!"); }); // runs each time a slider moves in the app bluetoothSlider.onSliderValue([](int slider1, int slider2) { // remember the new positions currentSlider1 = slider1; currentSlider2 = slider2; // log both values (0-100) Serial.print("Slider 1: "); Serial.print(slider1); Serial.print(", Slider 2: "); Serial.println(slider2); // scale 0-100 up to the 0-255 duty range int pwm1 = map(slider1, 0, 100, 0, 255); int pwm2 = map(slider2, 0, 100, 0, 255); // set the LED brightness through LEDC ledcWrite(PWM_CHANNEL_1, pwm1); ledcWrite(PWM_CHANNEL_2, pwm2); // TODO: put your own output code here // Ideas: // - Servo angle: myServo.write(map(slider1, 0, 100, 0, 180)); // - Motor speed: ledcWrite(MOTOR_CHANNEL, pwm1); // - Sound level: setVolume(slider1); // - Light level: setBrightness(slider2); }); // optional: the app asks for the positions when its slider screen opens bluetoothSlider.onGetConfig([]() { // reply with the stored positions bluetoothSlider.send(currentSlider1, currentSlider2); Serial.print("App requested values - Sent: Slider1="); Serial.print(currentSlider1); Serial.print(", Slider2="); Serial.println(currentSlider2); }); // the slider setup can also change while the sketch runs: // bluetoothSlider.setRange(0, 255); // new range 0-255 // bluetoothSlider.setStep(5); // bigger jumps of 5 Serial.println("Waiting for Bluetooth connection..."); } void loop() { // keep the Bluetooth link serviced bluetoothServer.loop(); delay(10); }
  1. Upload: hit the Upload button.
  2. Open the Serial Monitor at 115200 baud. After a reset it prints:
∞
Newbiely | Arduino IDE 2.3.8
──
☐
✕
File
Edit
Sketch
Tools
Help
ESP32 Dev Module
Newbiely.ino
···
8 Serial.println("Hello World!");
Output
Serial Monitor
Message (Enter to send message to 'ESP32 Dev Module' on 'COM15')
New Line
9600 baud
DIYables Bluetooth - ESP32 Slider Example Waiting for Bluetooth connection...
Ln 11, Col 1
ESP32 Dev Module on COM15
2

Step 2 — Option B: ESP32 Uno BLE Sketch (Android and iOS)

  1. Open the sketch: choose File Examples DIYables Bluetooth Esp32BLE_Slider, or paste the code below.
/* * This ESP32 Uno code was developed by newbiely.com * * This ESP32 Uno code is made available for public use without any restriction * * For comprehensive instructions and wiring diagrams, please visit: * https://newbiely.com/tutorials/esp32-uno/esp32-uno-diyables-bluetooth-app-slider */ /* * DIYables Bluetooth Library - ESP32 Uno BLE Slider Example * Talks to the DIYables Bluetooth STEM app on Android and iOS * * What this sketch shows (Bluetooth Slider): * - Two sliders in the app send a number from 0 to 100 * - Both sliders work on their own * - Range and step size can be changed in code * * Board: ESP32 Uno form board (BLE radio) * * Note: in Arduino IDE pick Tools > Partition Scheme > * "Huge APP (3MB No OTA/1MB SPIFFS)", the BLE stack is big * * How to use: * 1. Upload this sketch to the ESP32 Uno * 2. Open the Serial Monitor at 115200 baud to follow the link status * 3. Connect with the DIYables Bluetooth App and drag the sliders * * Tutorial: https://diyables.io/bluetooth-app * Author: DIYables */ #include <DIYables_BluetoothServer.h> #include <DIYables_BluetoothSlider.h> #include <platforms/DIYables_Esp32BLE.h> // BLE name and UUIDs the app looks for const char* DEVICE_NAME = "ESP32BLE_Slider"; 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"; // BLE link object and the server that runs the apps DIYables_Esp32BLE bluetooth(DEVICE_NAME, SERVICE_UUID, TX_UUID, RX_UUID); DIYables_BluetoothServer bluetoothServer(bluetooth); // slider app: lowest 0, highest 100, step 1 DIYables_BluetoothSlider bluetoothSlider(0, 100, 1); // last positions received from the app int currentSlider1 = 0; int currentSlider2 = 0; // two PWM outputs, e.g. for two dimmable LEDs const int PWM_PIN_1 = 13; // D9 (GPIO13) const int PWM_PIN_2 = 5; // D10 (GPIO5), boot strapping pin void setup() { Serial.begin(115200); delay(1000); Serial.println("DIYables Bluetooth - ESP32 BLE Slider Example"); // both PWM pins work as outputs pinMode(PWM_PIN_1, OUTPUT); pinMode(PWM_PIN_2, OUTPUT); // start the BLE server bluetoothServer.begin(); // register the slider app on the server bluetoothServer.addApp(&bluetoothSlider); // link events: send the stored positions on connect, log a drop bluetoothServer.setOnConnected([]() { Serial.println("Bluetooth connected!"); bluetoothSlider.send(currentSlider1, currentSlider2); }); bluetoothServer.setOnDisconnected([]() { Serial.println("Bluetooth disconnected!"); }); // runs each time a slider moves in the app bluetoothSlider.onSliderValue([](int slider1, int slider2) { currentSlider1 = slider1; currentSlider2 = slider2; Serial.print("Slider 1: "); Serial.print(slider1); Serial.print(", Slider 2: "); Serial.println(slider2); // scale 0-100 up to the 0-255 duty range int pwm1 = map(slider1, 0, 100, 0, 255); int pwm2 = map(slider2, 0, 100, 0, 255); analogWrite(PWM_PIN_1, pwm1); analogWrite(PWM_PIN_2, pwm2); // TODO: put your own output code here }); // reply to the app when its slider screen asks for the positions bluetoothSlider.onGetConfig([]() { bluetoothSlider.send(currentSlider1, currentSlider2); Serial.print("App requested values - Sent: Slider1="); Serial.print(currentSlider1); Serial.print(", Slider2="); Serial.println(currentSlider2); }); Serial.println("Waiting for Bluetooth connection..."); } void loop() { bluetoothServer.loop(); delay(10); }
  1. Upload it with the Upload button.
  2. Check the Serial Monitor at 115200 baud:
∞
Newbiely | Arduino IDE 2.3.8
──
☐
✕
File
Edit
Sketch
Tools
Help
ESP32 Dev Module
Newbiely.ino
···
8 Serial.println("Hello World!");
Output
Serial Monitor
Message (Enter to send message to 'ESP32 Dev Module' on 'COM15')
New Line
9600 baud
DIYables Bluetooth - ESP32 BLE Slider Example Waiting for Bluetooth connection...
Ln 11, Col 1
ESP32 Dev Module on COM15
2
  1. Pro tip: the example in the library menu uses other pin numbers. After you open it, set PWM_PIN_1 to 13 and PWM_PIN_2 to 5, so the code matches D9 and D10 on the header.

Step 3 — Connect the Phone App

When this step is done, each fader move shows up on the board.

  1. Get the app: DIYables Bluetooth App for Android or iOS.
  2. Classic sketch only — pair first: on the Android phone open Settings > Bluetooth, switch Bluetooth on, tap "ESP32_Slider", accept (no PIN) and wait until it reads "Paired". The BLE sketch skips this.
  3. Start the app and allow the access it asks for the first time:
    • Nearby Devices (Android 12 or newer) or Bluetooth (iOS) — lets the app find and link boards
    • Location (Android 11 or older) — old Android versions need it for a BLE scan
  • Make sure phone Bluetooth is on.
  • Scan: press Connect on the home screen. BLE and Classic devices both appear.
  • DIYables Bluetooth App - Home Screen with Scan Button
    1. Pick your board: "ESP32_Slider" for Classic, or "ESP32BLE_Slider" for BLE. The app jumps back to the home screen once linked.
    2. Open the faders: tap Slider in the app menu.
    DIYables Bluetooth App - Home Screen with Slider App
    1. Drag them: each fader runs from 0 to 100.
    DIYables Bluetooth App - Slider Screen
    1. Pro tip: tap the gear icon on the home screen to hide apps you never use. The DIYables Bluetooth App User Manual walks through every screen.

    Now return to the Serial Monitor window. The link message and every fader pair appear:

    ∞
    Newbiely | Arduino IDE 2.3.8
    ──
    ☐
    ✕
    File
    Edit
    Sketch
    Tools
    Help
    ESP32 Dev Module
    Newbiely.ino
    ···
    8 Serial.println("Hello World!");
    Output
    Serial Monitor
    Message (Enter to send message to 'ESP32 Dev Module' on 'COM15')
    New Line
    9600 baud
    Bluetooth connected! App requested values - Sent: Slider1=0, Slider2=0 Slider 1: 18, Slider 2: 0 Slider 1: 42, Slider 2: 0 Slider 1: 42, Slider 2: 67 Slider 1: 91, Slider 2: 67
    Ln 11, Col 1
    ESP32 Dev Module on COM15
    2

    With the LEDs wired, LED 1 follows fader 1 and LED 2 follows fader 2.

    Video Tutorial

    See the ESP32 Uno build in action in the video below.

    In the demo, each fader turns one servo. Servo 1 listens on D3 (GPIO25), servo 2 on D5 (GPIO16), and the 5V header pin feeds them both. Install the "ESP32Servo" library by Kevin Harrington before you upload it.

    Servo Wire ESP32 Uno Pin
    Red (power) of both servos 5V
    Brown (ground) of both servos GND
    Orange (signal) of servo 1 D3 (GPIO25)
    Orange (signal) of servo 2 D5 (GPIO16)
    /* * This ESP32 Uno code was developed by newbiely.com * * This ESP32 Uno code is made available for public use without any restriction * * For comprehensive instructions and wiring diagrams, please visit: * https://newbiely.com/tutorials/esp32-uno/esp32-uno-diyables-bluetooth-app-slider */ /* * DIYables Bluetooth Library - ESP32 Uno Classic Bluetooth Slider Demo * Talks to the DIYables Bluetooth STEM app on Android phones * Note: iPhones have no Classic Bluetooth. Load a BLE sketch for iOS. * * What this demo shows (Bluetooth Slider): * - Two sliders in the app send a number from 0 to 100 * - Each slider turns one servo motor from 0 to 180 degrees * - Range and step size can be changed in code * * Board: ESP32 Uno form board (Classic Bluetooth radio) * Library: ESP32Servo by Kevin Harrington * * Note: in Arduino IDE pick Tools > Partition Scheme > * "Huge APP (3MB No OTA/1MB SPIFFS)", the Bluetooth stack is big * * How to use: * 1. Upload this sketch to the ESP32 Uno * 2. Open the Serial Monitor at 115200 baud to follow the link status * 3. Connect with the DIYables Bluetooth App and drag the sliders * * Tutorial: https://diyables.io/bluetooth-app * Author: DIYables */ #include <DIYables_BluetoothServer.h> #include <DIYables_BluetoothSlider.h> #include <platforms/DIYables_Esp32Bluetooth.h> #include <ESP32Servo.h> Servo servo1, servo2; // Classic Bluetooth link with the name shown on the phone, plus the app server DIYables_Esp32Bluetooth bluetooth("ESP32_Slider"); DIYables_BluetoothServer bluetoothServer(bluetooth); // slider app: lowest 0, highest 100, step 1 DIYables_BluetoothSlider bluetoothSlider(0, 100, 1); // last positions received from the app int currentSlider1 = 0; int currentSlider2 = 0; void setup() { Serial.begin(115200); delay(1000); Serial.println("DIYables Bluetooth - ESP32 Slider Example"); servo1.attach(25); // D3 (GPIO25) carries the servo 1 signal servo2.attach(16); // D5 (GPIO16) carries the servo 2 signal // start the Bluetooth server bluetoothServer.begin(); // register the slider app on the server bluetoothServer.addApp(&bluetoothSlider); // runs when the phone links up bluetoothServer.setOnConnected([]() { Serial.println("Bluetooth connected!"); // put the app sliders at the stored positions bluetoothSlider.send(currentSlider1, currentSlider2); }); // runs when the phone drops the link bluetoothServer.setOnDisconnected([]() { Serial.println("Bluetooth disconnected!"); }); // runs each time a slider moves in the app bluetoothSlider.onSliderValue([](int slider1, int slider2) { currentSlider1 = slider1; currentSlider2 = slider2; // turn 0-100 into a servo angle of 0-180 degrees int angle1 = map(slider1, 0, 100, 0, 180); int angle2 = map(slider2, 0, 100, 0, 180); // move both horns to the new angles servo1.write(angle1); servo2.write(angle2); Serial.println("Servo1: " + String(angle1) + "°, Servo2: " + String(angle2) + "°"); }); // TODO: put your own output code here // Ideas: // - Servo angle: myServo.write(map(slider1, 0, 100, 0, 180)); // - Motor speed: ledcWrite(MOTOR_CHANNEL, pwm1); // - Sound level: setVolume(slider1); // - Light level: setBrightness(slider2); // optional: the app asks for the positions when its slider screen opens bluetoothSlider.onGetConfig([]() { // reply with the stored positions bluetoothSlider.send(currentSlider1, currentSlider2); Serial.print("App requested values - Sent: Slider1="); Serial.print(currentSlider1); Serial.print(", Slider2="); Serial.println(currentSlider2); }); // the slider setup can also change while the sketch runs: // bluetoothSlider.setRange(0, 255); // new range 0-255 // bluetoothSlider.setStep(5); // bigger jumps of 5 Serial.println("Waiting for Bluetooth connection..."); } void loop() { // keep the Bluetooth link serviced bluetoothServer.loop(); delay(10); }

    When you drag the faders in the demo, the Serial Monitor shows the servo angles:

    ∞
    Newbiely | Arduino IDE 2.3.8
    ──
    ☐
    ✕
    File
    Edit
    Sketch
    Tools
    Help
    ESP32 Dev Module
    Newbiely.ino
    ···
    8 Serial.println("Hello World!");
    Output
    Serial Monitor
    Message (Enter to send message to 'ESP32 Dev Module' on 'COM15')
    New Line
    9600 baud
    Bluetooth connected! Servo1: 34°, Servo2: 0° Servo1: 34°, Servo2: 99° Servo1: 147°, Servo2: 99°
    Ln 11, Col 1
    ESP32 Dev Module on COM15
    2

    How the Sketch Works

    Read this table to know which line does which job.

    Code Part What It Does
    DIYables_Esp32BLE or DIYables_Esp32Bluetooth Picks the radio and sets the name the phone sees
    DIYables_BluetoothSlider bluetoothSlider(0, 100, 1) Builds the fader app with its low end, high end and step
    onSliderValue() Runs on every fader move, saves both numbers and drives the outputs
    map(slider, 0, 100, 0, 255) Stretches the fader value to the 8-bit PWM duty
    onGetConfig() and setOnConnected() Send the saved numbers back, so the faders keep their place
    bluetoothServer.loop() Handles the radio traffic, so it must run in every loop()

    The result: the faders and the two PWM pins always show the same values, even after the phone reconnects.

    Good to know: the BLE sketch uses analogWrite(), while the Classic sketch uses the LEDC functions ledcSetup(), ledcAttachPin() and ledcWrite(). Both make a 5 kHz-class PWM with 8-bit duty on the ESP32 Uno.

    ESP32 Uno vs UNO R4 for This Project

    Moving the slider project from the UNO R4 WiFi to the ESP32 Uno changes the radio code and the pin numbers, not the idea.

    Item Arduino UNO R4 WiFi ESP32 Uno
    Logic voltage 5V 3.3V
    Bluetooth BLE only BLE and Classic Bluetooth
    Library platform file DIYables_ArduinoBLE.h DIYables_Esp32BLE.h or DIYables_Esp32Bluetooth.h
    PWM pins in code 9 and 10 13 for D9 and 5 for D10
    Demo servo library Servo.h on pins 3 and 5 ESP32Servo.h on GPIO25 and GPIO16
    Arduino IDE board Arduino UNO R4 WiFi ESP32 Dev Module with Huge APP partition

    The LEDs and servos sit on the same header holes, so the wiring stays as it is. Only the 3.3V output and the strapping role of D10 are new things to keep in mind.

    Shape the Faders for Your Project

    By the end of this part, you know the five library calls that customize the faders.

    Pick Start Positions

    The two global variables hold the fader positions. Give them a value, and the app opens at that spot after a connect.

    // fader start positions (0-100) int currentSlider1 = 25; // starts at 25% int currentSlider2 = 50; // starts at 50%

    Change Range and Step

    Set the range in the constructor, change it later at run time, or read it back.

    // fader app from 0 to 255, moving in steps of 5 DIYables_BluetoothSlider bluetoothSlider(0, 255, 5); // change it while the sketch runs: bluetoothSlider.setRange(0, 255); // new range 0-255 bluetoothSlider.setStep(5); // jumps of 5 for coarse control // read the current setup: int currentMin = bluetoothSlider.getMin(); // lowest value int currentMax = bluetoothSlider.getMax(); // highest value int currentStep = bluetoothSlider.getStep(); // step size

    Reply When the App Asks

    Each time the fader screen opens, the app asks the ESP32 Uno for the current numbers. Answer inside onGetConfig(), or the faders start at 0.

    bluetoothSlider.onGetConfig([]() { // the app opened its fader screen and wants the numbers // reply with the saved positions so both faders sit right bluetoothSlider.send(currentSlider1, currentSlider2); Serial.println("App requested config - sent current values"); });

    Move the Faders from the Board

    The board can push new fader positions to the phone, for example after a button press or a timer.

    // push both positions to the app bluetoothSlider.send(currentSlider1, currentSlider2); // push one number, used for both faders bluetoothSlider.send(50);

    Catch Connect and Disconnect

    Use these two callbacks to react when the phone joins or leaves. Stopping motors on a drop is a safe habit.

    // phone linked to the ESP32 Uno bluetoothServer.setOnConnected([]() { Serial.println("Bluetooth connected!"); // put the app faders at the saved positions bluetoothSlider.send(currentSlider1, currentSlider2); }); // phone left the ESP32 Uno bluetoothServer.setOnDisconnected([]() { Serial.println("Bluetooth disconnected!"); // optional: switch off motors or reset outputs here }); // test the link state from any place in the sketch if (bluetoothServer.isConnected()) { // code that only runs while linked }

    Reading the Fader Screen

    Use this table to know what each part of the app screen means.

    Screen Part Meaning
    Fader 1 Sends the first number, slider1 in the callback
    Fader 2 Sends the second number, slider2 in the callback
    Number next to a fader The value the board gets right now
    Default scale 0 to 100, unless your code sets another range

    Good to know: to drive a PWM pin, stretch the number with map(value, 0, 100, 0, 255).

    Example Projects with the Faders

    Each example below is a part of a sketch. Drop it into the full BLE or Classic sketch above.

    Example 1 — Simplest Handler

    This callback only saves and prints the two numbers. Add your own output code at the end.

    void setup() { // callback for every fader move bluetoothSlider.onSliderValue([](int slider1, int slider2) { // save the new numbers currentSlider1 = slider1; currentSlider2 = slider2; // print both values Serial.println("Slider 1: " + String(slider1) + ", Slider 2: " + String(slider2)); // your output code goes here }); }

    Example 2 — Two Dimmable LEDs (BLE)

    Fader 1 sets LED 1 on D9 (GPIO13), fader 2 sets LED 2 on D10 (GPIO5). Use the LED wiring table from the top of the page.

    // PWM pins for the two LEDs const int PWM_PIN_1 = 13; // D9 (GPIO13) const int PWM_PIN_2 = 5; // D10 (GPIO5) void setup() { // both pins are outputs pinMode(PWM_PIN_1, OUTPUT); pinMode(PWM_PIN_2, OUTPUT); bluetoothSlider.onSliderValue([](int slider1, int slider2) { currentSlider1 = slider1; currentSlider2 = slider2; // 0-100 becomes a duty of 0-255 int pwm1 = map(slider1, 0, 100, 0, 255); int pwm2 = map(slider2, 0, 100, 0, 255); // set the brightness analogWrite(PWM_PIN_1, pwm1); analogWrite(PWM_PIN_2, pwm2); Serial.println("LED1 Brightness: " + String(pwm1) + ", LED2 Brightness: " + String(pwm2)); }); }

    Example 3 — Two Dimmable LEDs with LEDC (Classic Bluetooth)

    The same job with the LEDC channel functions, as in the Classic sketch. Each pin gets its own channel.

    // PWM pins for the two LEDs const int PWM_PIN_1 = 13; // D9 (GPIO13) const int PWM_PIN_2 = 5; // D10 (GPIO5) // one LEDC channel per pin const int PWM_CHANNEL_1 = 0; const int PWM_CHANNEL_2 = 1; void setup() { // LEDC at 5 kHz with 8-bit duty ledcSetup(PWM_CHANNEL_1, 5000, 8); ledcSetup(PWM_CHANNEL_2, 5000, 8); ledcAttachPin(PWM_PIN_1, PWM_CHANNEL_1); ledcAttachPin(PWM_PIN_2, PWM_CHANNEL_2); bluetoothSlider.onSliderValue([](int slider1, int slider2) { currentSlider1 = slider1; currentSlider2 = slider2; // 0-100 becomes a duty of 0-255 int pwm1 = map(slider1, 0, 100, 0, 255); int pwm2 = map(slider2, 0, 100, 0, 255); // write the duty through LEDC ledcWrite(PWM_CHANNEL_1, pwm1); ledcWrite(PWM_CHANNEL_2, pwm2); Serial.println("LED1 Brightness: " + String(pwm1) + ", LED2 Brightness: " + String(pwm2)); }); }

    Example 4 — Two Servo Arms

    Each fader swings one servo from 0° to 180°. The plain Servo library does not run on the ESP32 Uno, so install "ESP32Servo" by Kevin Harrington.

    Servo Wire ESP32 Uno Pin
    Red (power) of both servos 5V
    Brown (ground) of both servos GND
    Orange (signal) of servo 1 D9 (GPIO13)
    Orange (signal) of servo 2 D10 (GPIO5)
    #include <ESP32Servo.h> Servo servo1, servo2; void setup() { // signal pins of the two servos servo1.attach(13); // D9 (GPIO13) servo2.attach(5); // D10 (GPIO5) bluetoothSlider.onSliderValue([](int slider1, int slider2) { currentSlider1 = slider1; currentSlider2 = slider2; // 0-100 becomes an angle of 0-180 degrees int angle1 = map(slider1, 0, 100, 0, 180); int angle2 = map(slider2, 0, 100, 0, 180); // move the horns servo1.write(angle1); servo2.write(angle2); Serial.println("Servo1: " + String(angle1) + "°, Servo2: " + String(angle2) + "°"); }); }

    Example 5 — One Motor with Speed and Direction

    Fader 1 is the speed, fader 2 picks the way: 50 or more is forward, under 50 is reverse. The speed input of the motor driver goes to D9 (GPIO13), the direction input to D8 (GPIO12).

    WARNING

    D8 (GPIO12) is a boot strapping pin and must be LOW when the board starts. If the driver input pulls it HIGH, the flash runs at the wrong voltage and the ESP32 Uno will not boot. Unplug the D8 wire if the board hangs at power-on or during upload.

    const int MOTOR_SPEED_PIN = 13; // D9 (GPIO13) to the driver speed input const int MOTOR_DIR_PIN = 12; // D8 (GPIO12) to the driver direction input, keep LOW at boot void setup() { pinMode(MOTOR_SPEED_PIN, OUTPUT); pinMode(MOTOR_DIR_PIN, OUTPUT); bluetoothSlider.onSliderValue([](int slider1, int slider2) { // fader 1 = speed in percent // fader 2 = way: under 50 is reverse, 50 and up is forward int speed = map(slider1, 0, 100, 0, 255); bool forward = (slider2 >= 50); analogWrite(MOTOR_SPEED_PIN, speed); digitalWrite(MOTOR_DIR_PIN, forward ? HIGH : LOW); Serial.print("Speed: "); Serial.print(slider1); Serial.print("%, Direction: "); Serial.println(forward ? "Forward" : "Reverse"); }); }

    Example 6 — Two DC Motors on a Driver

    Each fader sets the speed of one motor. Both motors are set to run forward at start.

    Driver Input ESP32 Uno Pin
    Motor 1 speed (PWM) D9 (GPIO13)
    Motor 1 direction A D2 (GPIO26)
    Motor 1 direction B D4 (GPIO17)
    Motor 2 speed (PWM) D10 (GPIO5)
    Motor 2 direction A D7 (GPIO14)
    Motor 2 direction B D6 (GPIO27)
    // motor driver inputs const int MOTOR1_PWM = 13; // D9 (GPIO13) motor 1 speed const int MOTOR1_DIR1 = 26; // D2 (GPIO26) motor 1 way, line A const int MOTOR1_DIR2 = 17; // D4 (GPIO17) motor 1 way, line B const int MOTOR2_PWM = 5; // D10 (GPIO5) motor 2 speed const int MOTOR2_DIR1 = 14; // D7 (GPIO14) motor 2 way, line A const int MOTOR2_DIR2 = 27; // D6 (GPIO27) motor 2 way, line B void setup() { // every driver input is an output pinMode(MOTOR1_PWM, OUTPUT); pinMode(MOTOR1_DIR1, OUTPUT); pinMode(MOTOR1_DIR2, OUTPUT); pinMode(MOTOR2_PWM, OUTPUT); pinMode(MOTOR2_DIR1, OUTPUT); pinMode(MOTOR2_DIR2, OUTPUT); // both motors start in the forward way digitalWrite(MOTOR1_DIR1, HIGH); digitalWrite(MOTOR1_DIR2, LOW); digitalWrite(MOTOR2_DIR1, HIGH); digitalWrite(MOTOR2_DIR2, LOW); bluetoothSlider.onSliderValue([](int slider1, int slider2) { currentSlider1 = slider1; currentSlider2 = slider2; // 0-100 becomes a duty of 0-255 int pwm1 = map(slider1, 0, 100, 0, 255); int pwm2 = map(slider2, 0, 100, 0, 255); // set both motor speeds analogWrite(MOTOR1_PWM, pwm1); analogWrite(MOTOR2_PWM, pwm2); Serial.println("Motor1: " + String(slider1) + "%, " + "Motor2: " + String(slider2) + "%"); }); }

    Example 7 — RGB LED Mixer

    Two faders, three colors: fader 1 is red, fader 2 is blue, and green is the average of the two. Wire red to D3 (GPIO25), green to D5 (GPIO16) and blue to D6 (GPIO27), each through a 220 ohm resistor.

    // RGB LED legs const int RED_PIN = 25; // D3 (GPIO25) const int GREEN_PIN = 16; // D5 (GPIO16) const int BLUE_PIN = 27; // D6 (GPIO27) void setup() { pinMode(RED_PIN, OUTPUT); pinMode(GREEN_PIN, OUTPUT); pinMode(BLUE_PIN, OUTPUT); bluetoothSlider.onSliderValue([](int slider1, int slider2) { currentSlider1 = slider1; currentSlider2 = slider2; // fader 1 = red level // fader 2 = blue level // green = the mean of red and blue int redValue = map(slider1, 0, 100, 0, 255); int blueValue = map(slider2, 0, 100, 0, 255); int greenValue = (redValue + blueValue) / 2; analogWrite(RED_PIN, redValue); analogWrite(GREEN_PIN, greenValue); analogWrite(BLUE_PIN, blueValue); Serial.println("RGB - R:" + String(redValue) + " G:" + String(greenValue) + " B:" + String(blueValue)); }); }

    Smarter Fader Handling

    By the end of this part, your outputs react in a softer or more structured way.

    Soft Ramps

    A jump from 0 to 100 can jerk a motor. This class walks the output to the new target by 2 points every 10 ms.

    class SliderSmoother { private: int currentValue = 0; int targetValue = 0; unsigned long lastUpdate = 0; const int SMOOTH_RATE = 2; // points moved per step public: void setTarget(int target) { targetValue = target; } int getCurrentValue() { return currentValue; } bool update() { if (millis() - lastUpdate > 10) { // one step every 10 ms bool changed = false; if (currentValue < targetValue) { currentValue = min(currentValue + SMOOTH_RATE, targetValue); changed = true; } else if (currentValue > targetValue) { currentValue = max(currentValue - SMOOTH_RATE, targetValue); changed = true; } lastUpdate = millis(); return changed; } return false; } }; SliderSmoother smoother1, smoother2; void setup() { bluetoothSlider.onSliderValue([](int slider1, int slider2) { // store the goal, the ramp does the rest smoother1.setTarget(slider1); smoother2.setTarget(slider2); }); } void loop() { bluetoothServer.loop(); // take one ramp step bool changed1 = smoother1.update(); bool changed2 = smoother2.update(); if (changed1 || changed2) { // write the ramped values to D9 (GPIO13) and D10 (GPIO5) analogWrite(13, map(smoother1.getCurrentValue(), 0, 100, 0, 255)); analogWrite(5, map(smoother2.getCurrentValue(), 0, 100, 0, 255)); } }

    Three Levels from One Fader

    Split fader 1 into off, low and high, and switch three digital outputs on D2 (GPIO26), D4 (GPIO17) and D7 (GPIO14). Fader 2 keeps PWM on D10 (GPIO5).

    void setupThresholdControl() { bluetoothSlider.onSliderValue([](int slider1, int slider2) { currentSlider1 = slider1; currentSlider2 = slider2; // borders between the three levels const int LOW_THRESHOLD = 33; const int MEDIUM_THRESHOLD = 66; // fader 1 picks the level: D2 (GPIO26), D4 (GPIO17), D7 (GPIO14) if (slider1 < LOW_THRESHOLD) { // level 0: all three off digitalWrite(26, LOW); digitalWrite(17, LOW); digitalWrite(14, LOW); } else if (slider1 < MEDIUM_THRESHOLD) { // level 1: only the first one on digitalWrite(26, HIGH); digitalWrite(17, LOW); digitalWrite(14, LOW); } else { // level 2: all three on digitalWrite(26, HIGH); digitalWrite(17, HIGH); digitalWrite(14, HIGH); } // fader 2 drives PWM on D10 (GPIO5) analogWrite(5, map(slider2, 0, 100, 0, 255)); }); }

    Saved Presets

    One call jumps to a stored pair of values. The outputs change, and the faders on the phone move with them.

    // stored fader pairs (0-100) const int PRESETS[][2] = { {0, 0}, // 0: both off {25, 50}, // 1: low and middle {50, 50}, // 2: both middle {100, 50}, // 3: full and middle {100, 100} // 4: both full }; void applyPreset(int presetNumber) { if (presetNumber >= 0 && presetNumber < 5) { currentSlider1 = PRESETS[presetNumber][0]; currentSlider2 = PRESETS[presetNumber][1]; // outputs on D9 (GPIO13) and D10 (GPIO5) analogWrite(13, map(currentSlider1, 0, 100, 0, 255)); analogWrite(5, map(currentSlider2, 0, 100, 0, 255)); // move the faders on the phone too bluetoothSlider.send(currentSlider1, currentSlider2); Serial.println("Applied preset " + String(presetNumber) + ": " + String(currentSlider1) + ", " + String(currentSlider2)); } }

    Bigger Loads on the Faders

    The same callback can run an LED strip or fans. Never power these loads straight from a GPIO pin.

    Addressable LED Strip

    Fader 1 is the brightness and fader 2 is the hue of a WS2812B strip. Add FastLED or Adafruit NeoPixel, and connect the data line to D7 (GPIO14). Many strips accept the 3.3V data signal; if yours flickers, add a level shifter.

    // for WS2812B or similar strips // (add FastLED or Adafruit NeoPixel to drive it) const int LED_STRIP_PIN = 14; // D7 (GPIO14) to the strip data input const int NUM_LEDS = 30; void setupLEDStrip() { // start the strip here (depends on the library) bluetoothSlider.onSliderValue([](int slider1, int slider2) { currentSlider1 = slider1; currentSlider2 = slider2; // fader 1 = brightness, 0-100 to 0-255 // fader 2 = hue, 0-100 to 0-255 uint8_t brightness = map(slider1, 0, 100, 0, 255); uint8_t hue = map(slider2, 0, 100, 0, 255); // sketch of the strip calls // strip.setBrightness(brightness); // strip.fill(CHSV(hue, 255, 255)); // strip.show(); Serial.println("LED Strip - Brightness: " + String(brightness) + ", Hue: " + String(hue)); }); }

    Two Fans

    Small fans stall at a low duty. This code keeps a fan off near the bottom and starts it at a safe speed. Switch each fan with a MOSFET or transistor module on D9 (GPIO13) and D10 (GPIO5).

    const int FAN1_PIN = 13; // D9 (GPIO13) to the fan 1 MOSFET const int FAN2_PIN = 5; // D10 (GPIO5) to the fan 2 MOSFET void setupFanControl() { pinMode(FAN1_PIN, OUTPUT); pinMode(FAN2_PIN, OUTPUT); bluetoothSlider.onSliderValue([](int slider1, int slider2) { currentSlider1 = slider1; currentSlider2 = slider2; // 0-100 becomes a duty of 0-255 int pwm1 = map(slider1, 0, 100, 0, 255); int pwm2 = map(slider2, 0, 100, 0, 255); // off near the bottom, then a minimum start speed int fan1Speed = (pwm1 > 50) ? map(pwm1, 50, 255, 100, 255) : 0; int fan2Speed = (pwm2 > 50) ? map(pwm2, 50, 255, 100, 255) : 0; analogWrite(FAN1_PIN, fan1Speed); analogWrite(FAN2_PIN, fan2Speed); Serial.println("Fan1: " + String(slider1) + "%, " + "Fan2: " + String(slider2) + "%"); }); }

    Choosing BLE or Classic on the ESP32 Uno

    Both radios are on the board. Use this table to pick one for your fader project.

    Point BLE (Esp32BLE_Slider) Classic (Esp32Bluetooth_Slider)
    iPhone Works Does not work
    Android Works Works
    Current draw Lower Higher
    Typical reach About 30 to 100 m in open air About 10 to 100 m in open air
    Throughput Lower Higher
    Pairing step None, connect in the app Pair in phone settings first
    Name in the scan list ESP32BLE_Slider ESP32_Slider

    Debug Helper

    Call this function inside onSliderValue() while you test. It prints both faders and their PWM duty in one block.

    void debugSliderValues(int slider1, int slider2) { Serial.println("=== Slider Debug ==="); Serial.println("Slider 1: " + String(slider1) + "%"); Serial.println("Slider 2: " + String(slider2) + "%"); Serial.println("PWM 1: " + String(map(slider1, 0, 100, 0, 255))); Serial.println("PWM 2: " + String(map(slider2, 0, 100, 0, 255))); Serial.println("==================="); }

    Build Ideas

    Pick a row and adapt one of the examples above.

    Area Project Ideas
    Light Desk lamp dimmer, RGB mood light, LED strip with brightness and hue, mini stage dimmer
    Motion Robot car speed, pan-tilt camera head with two servos, small water pump flow, conveyor model
    Sound Buzzer pitch, amplifier volume, simple two-band tone control
    Home Heater or cooler level, blind position, garden watering rate

    Mix the Faders with Other Bluetooth Apps

    One ESP32 Uno can run several DIYables Bluetooth apps at the same time.

    Faders Plus Joystick

    Fader 1 caps the speed, and the joystick gives the direction. The joystick values are scaled by the cap before they reach the motors.

    // speed cap set by fader 1 int maxSpeed = 100; // fader callback bluetoothSlider.onSliderValue([](int slider1, int slider2) { maxSpeed = slider1; // fader 1 becomes the cap }); // joystick callback bluetoothJoystick.onJoystickValue([](int x, int y) { // scale the stick by the cap int scaledX = map(x, -100, 100, -maxSpeed, maxSpeed); int scaledY = map(y, -100, 100, -maxSpeed, maxSpeed); controlRobot(scaledX, scaledY); });

    Faders Plus Digital Pins

    The digital pins app works as an on/off switch, and the fader sets the level. A PWM output only runs while its switch pin reads HIGH. In this snippet, D2 (GPIO26) and D4 (GPIO17) act as the switches, while D9 (GPIO13) and D10 (GPIO5) carry the PWM.

    bluetoothSlider.onSliderValue([](int slider1, int slider2) { // PWM only while the matching switch pin is on if (digitalRead(26) == HIGH) { // D2 (GPIO26) analogWrite(13, map(slider1, 0, 100, 0, 255)); // D9 (GPIO13) } else { analogWrite(13, 0); } if (digitalRead(17) == HIGH) { // D4 (GPIO17) analogWrite(5, map(slider2, 0, 100, 0, 255)); // D10 (GPIO5) } else { analogWrite(5, 0); } });

    Try These Next

    Once the faders work, add another control style to your ESP32 Uno:

    1. ESP32 Uno - Bluetooth Joystick for two-axis steering
    2. ESP32 Uno - Bluetooth Digital Pins for plain on/off switches
    3. ESP32 Uno - Bluetooth Monitor to read fader values as text on the phone
    4. ESP32 Uno - Multiple Bluetooth Apps to put faders and other screens in one sketch

    Where to Get Help

    Stuck? Try these, in this order:

    1. The API reference that comes with the DIYables Bluetooth library
    2. The Arduino community forums

    Troubleshooting

    Problem Possible Cause Solution
    No COM port shows in Arduino IDE CH340 driver missing or a charge-only cable Install the CH340 driver and swap to a USB cable that carries data
    Upload stops at Failed to connect or Waiting for download Board did not enter download mode Hold the BOOT button while the upload starts, then let go
    Error says the sketch is too big Default partition leaves too little flash for Bluetooth Choose Huge APP (3MB No OTA/1MB SPIFFS) under Tools > Partition Scheme
    Compile error ledcSetup was not declared esp32 core 3.x removed the old LEDC functions used by the Classic sketch Use analogWrite() as in the BLE sketch, or switch to ledcAttach(pin, freq, bits) and ledcWrite(pin, duty)
    Board name is missing from the app scan Sketch not running, phone Bluetooth off, or Classic board not paired Look for Waiting for Bluetooth connection in the Serial Monitor, turn Bluetooth on (and Location on old Android), pair ESP32_Slider for Classic
    Faders snap back to 0 after a reconnect Values are not sent back to the app Keep them in global variables and send them in onGetConfig() and setOnConnected()
    LED brightness never changes Wrong pin number, LED turned around or no resistor Use 13 for D9 and 5 for D10 in code, check the long leg, add a 220 ohm resistor
    Board will not start or take an upload with parts wired D10 (GPIO5) or D8 (GPIO12) is a boot strapping pin held the wrong way Pull the wire off that pin while uploading, or use another pin
    Board resets as soon as the servos move Servo current spikes on the 5V pin Feed the servos from a separate 5V supply and join its GND to the board GND
    Link drops every few minutes Phone too far away or a weak USB port Move the phone closer and try a powered USB hub or another port

    FAQ

    Do I pick BLE or Classic Bluetooth for the ESP32 Uno slider?

    Pick BLE if any iPhone will connect or you want to skip pairing. Pick Classic if all phones run Android. Both sketches give the same two faders and the same 0 to 100 values.

    What number range does each fader send?

    By default each fader sends whole numbers from 0 to 100 in steps of 1. You can set another range and step in the DIYables_BluetoothSlider(min, max, step) constructor or with setRange() and setStep().

    Why do I map the value to 0-255?

    analogWrite() and ledcWrite() with 8-bit resolution take a duty from 0 to 255. map(value, 0, 100, 0, 255) turns the fader percent into that duty, so 100 means fully on.

    Which pins can make PWM on the ESP32 Uno?

    Almost every output pin on the headers, D2 to D13 and A0 to A1, can make PWM. A2 to A5 (GPIO35, 34, 36, 39) are input only, so they cannot drive an LED, servo or motor.

    Why do my LEDs look dimmer than on a 5V board?

    A high ESP32 Uno pin sits at only 3.3V. With a 220 ohm resistor the LED gets less current than on a 5V board. A smaller resistor (not under about 100 ohm) or a transistor makes it brighter.

    Can the ESP32 Uno 5V pin power two servos?

    Two small SG90 servos with no load usually run fine from 5V while the board is on USB. Larger servos or servos under load need an external 5V supply. Always connect that supply's GND to the board GND.

    Is it a problem that D10 is a boot strapping pin?

    D10 is GPIO5, which the chip reads at power-on. An LED with a resistor or a servo signal does not hold it in a wrong state, so the project works. If the board ever hangs at start, unplug D10 during reset or upload.

    What do I change when I move UNO R4 slider code to the ESP32 Uno?

    Swap DIYables_ArduinoBLE.h for DIYables_Esp32BLE.h (or DIYables_Esp32Bluetooth.h), write GPIO numbers instead of Uno pin numbers (9 becomes 13, 10 becomes 5), and use ESP32Servo.h instead of Servo.h. Also set the Serial Monitor to 115200 baud and choose the Huge APP partition.

    Does the ESP32 Uno need a USB driver?

    The board talks through a CH340 USB-to-serial chip. Windows 10 and 11 often install the driver by themselves; if no COM port appears, install the CH340 driver by hand.

    Can I control the same LEDs from a web page instead of Bluetooth?

    Yes. The ESP32 Uno also has WiFi. The ESP32 Uno - Web Slider tutorial gives you two sliders in a browser on the same network.

    What if my project needs more pins than the Uno headers give?

    The ESP32 Uno has a few extra holes near the power header: GPIO32 and GPIO33 (I/O, PWM, analog on ADC1, so they also work while WiFi is on) and GPIO15 (I/O, PWM, analog on ADC2). Solder pin headers and write the GPIO number in code. For a third LED or servo in this project, GPIO32 or GPIO33 is the best pick. Two warnings: GPIO15 and GPIO0 (the IO0 pin at the unused Uno NC position) are boot strapping pins, and a wrong connection can stop the board from booting or uploading, so use GPIO32/33 first. Also never use the six holes under the digital header (SD0 to SD3, CMD, CLK = GPIO6 to GPIO11); they are wired to the flash chip, and using them crashes the board.

    ※ OUR MESSAGES

    • As freelancers, We are AVAILABLE for HIRE. See how to outsource your project to us
    • 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!