Carrinho Web Bluetooth
A website that drives an ESP32 car over Bluetooth, with no app to install
- Embedded
- Software
- Electronics
- Year
- 2026
- Context
- Electronics Technician program project — Fundação Liberato
- Team
- Maurício Gedrat, Matheus Bizarro
Illustrative background photo: Juanjo Jaramillo / Unsplash
Overview
ESP32 firmware plus a Next.js site that controls the car straight from the browser through the Web Bluetooth API.
Records



The problem
The car was driven by old Android apps. The goal was to drive it from a browser, on a phone or a PC, with nothing to install — without breaking the apps that already worked.
The approach
- 01Web Bluetooth only speaks BLE, so the firmware runs both radios at once: BLE for the site and classic Bluetooth for the old apps.
- 02A one-letter-per-command protocol over the Nordic UART service: F, B, S for drive; L, R, C for steering; 1, 2, 3 for speed; H for the headlight.
- 03The ESP32 replies with its state in 4 letters (e.g. F2C1), and the car drawn on screen lights the same lamps as the real one.
How the system works
- 01
Browser
Next.js + Web Bluetooth
- 02
BLE · Nordic UART
1-letter commands
- 03
ESP32
BLE + classic Bluetooth
- 04
L298N H-bridge
drive and steering PWM
- 05
Motors and lights
headlight, indicators, brake
Implementation
- Hold to drive, release to stop. On a computer: arrow keys or W A S D, keys 1, 2, 3 for speed and H for the headlight.
- Two layers of safety: if the tab loses focus the site sends a stop, and if Bluetooth drops the ESP32 itself cuts the motors.
- Indicators and brake lights blink with millis(), not delay, so the loop never blocks while commands arrive.
Result
Works in Chrome and Edge on Android and desktop. It doesn't work on iPhone or Firefox, which don't support Web Bluetooth, and it requires HTTPS.
Technologies
- Next.js
- TypeScript
- Tailwind CSS
- Web Bluetooth API
- ESP32
- Arduino (C++)
- L298N