Project Overview
This project combines an Arduino-based robot car with a Bluetooth module (HC-05/HC-06) and a React Native controller app. The phone connects over classic Bluetooth and sends simple text commands to drive the car.
Arduino Firmware
Reads Bluetooth serial commands like F150 or L200 and
controls the motors through an L298N driver.
- Board: Arduino-compatible
- Bluetooth: HC‑05 / HC‑06 (SPP)
- Driver: L298N dual H-bridge
Mobile Controller
A React Native app (Android) built with react-native-bluetooth-classic
provides connect, speed, and directional controls.
- Platform: React Native CLI
- Connects to: HC‑05 / HC‑06
- Commands: Forward, Backward, Left, Right, Stop
Hardware Setup
Wire your components as described below. Adjust pin numbers in the Arduino sketch if you change the wiring.
Required Components
- Arduino (Uno / Nano or similar)
- HC‑05 or HC‑06 Bluetooth module
- L298N motor driver board
- 2x DC motors + chassis + wheels
- Battery pack (with common ground to Arduino)
Example Pin Mapping
- ENA: 5 (PWM)
- IN1: 8, IN2: 9
- ENB: 6 (PWM)
- IN3: 10, IN4: 11
- HC‑05 TX/RX → Arduino RX/TX (with level shifting as needed)
See arduino/RobotCar.ino in the repository for the exact firmware.
Bluetooth Command Protocol
The phone sends simple text commands over Bluetooth serial. Each command is terminated
with a newline (\n).
Commands
F<speed>– forward (0–255)B<speed>– backward (0–255)L<speed>– turn leftR<speed>– turn rightS– stopV<speed>– set base speed
Example
F150\n → drive forward at speed 150
L120\n → turn left at speed 120
S\n → stop the car
React Native App
The controller app is located under
react_native/RobotCarRN/ in the repository. It discovers a bonded
Bluetooth device named HC-05, HC-06, or BT-CAR
and sends the commands above.
- Install dependencies with
npm install(oryarn). - Connect your Android device and enable USB debugging.
- Run
npm run androidinsidereact_native/RobotCarRN. - Pair your phone with the HC‑05/HC‑06 in system settings, then tap “Connect” in the app.
Get Started Locally
- Clone or download this repository to your computer.
- Flash the Arduino sketch at
arduino/RobotCar.ino. - Pair your phone with the HC‑05/HC‑06 Bluetooth module.
- Run the React Native app on Android and start driving your car.
This website is a static overview only; Bluetooth control is provided by the native app, not the browser.