This project connects a robot car powered by an ESP32 microcontroller to a custom iOS app via Bluetooth Low Energy (BLE). It demonstrates real-time embedded control, BLE communication, and cross-platform system integration between mobile and hardware.
This was my first full integration of embedded systems and mobile development. The iOS app sends directional commands (forward, backward, left, right, stop) to the ESP32, which controls the car’s motors using GPIO pins and a motor driver. The goal was to explore real-time responsiveness, wireless control, and performance tuning.
| Area | Description |
|---|---|
| Embedded C/C++ | Programmed the ESP32 to handle BLE connections and motor control logic |
| BLE Communication | Built a GATT server on the ESP32 and used CoreBluetooth on iOS to connect |
| Latency Testing | Reduced command response latency by 41% (0.61s → 0.36s) using iterative optimization |
| Debugging | Implemented cross-platform error handling and tested over 15 command-response cycles |
| iOS App | Designed a clean Swift-based app to send BLE commands and handle connection states |
- Voltage Drop: The motors drew more current than expected. I analyzed the power behavior and adjusted the battery setup to stabilize performance.
- BLE Stability: Initial connection issues were resolved by improving error handling and logging on both the ESP32 and iOS sides.
- Responsiveness: I ran manual timed tests (15+ iterations), identified code bottlenecks, and optimized both BLE settings and app-side logic to reduce latency.
The project went beyond functional success. I focused on making the system responsive and reliable:
- Timed BLE command-to-response cycles manually
- Refined BLE characteristic updates
- Removed redundant code in both firmware and app layers
- Microcontroller: ESP32 (built-in BLE)
- Embedded Language: C/C++ using Arduino core
- Mobile App: Swift (CoreBluetooth)
- Motor Driver: L298N dual H-bridge
- Power: Battery pack for motors and logic
- Tools: Serial Monitor for debugging, stopwatch-based latency testing
- ESP32 board
- L298N Motor Driver
- DC motors and chassis
- Power supply (battery pack)
- Jumper wires, breadboard
- Arduino IDE or PlatformIO
- Xcode (iOS app)
- UUID generator for BLE services/characteristics
- Clone or download the project.
- Replace BLE UUIDs with your own (can be generated at uuidgenerator.net).
- Ensure Bluetooth permissions are added in
Info.plistfor iOS. - Upload the ESP32 firmware.
- Launch the iOS app and connect to your robot.
This project is open source for anyone learning embedded development, Bluetooth integration, or mobile-hardware communication. Contributions and feedback are welcome.
Andrew Muniz
📧 andrewjosephmuniz@gmail.com