A simple remote-controlled car with built-in crash avoidance.
You can find a small chaotic demo on YouTube. 🙈
This simple Arduino car comes with the following features:
- Website to connect to and control the car via bluetooth (app folder).
- Website is deployed to Cloudflare Workers (via wrangler).
- Website implements the Web Bluetooth API to connect to the car (Note: Does not work on all browsers and devices).
- Arduino Uno connected to:
- Bluetooth Module for remote control.
- Two Motors for the car (four motors installed but only two connected).
- A sonar sensor to detect obstacles (distance) in the front.
- A passive buzzer to warn for a crash (based on distance).
- A debug LED that signals the status of the car.
- Arduino Uno Sketch implements a execution loop including (sketch folder):
- Check for command from the website (Bluetooth).
- Check for obstacles in front.
- Execute next command based on the two checks.
- Develop website:
- Add ESLint/Prettier Setup [X]
- Set up Tailwind CSS [X]
- Add Cool Font [X]
- Add Connect Button [X]
- Integrate with Bluetooth API (GATT connect and write) [X]
- Add Car Controls to Website [X]
- Deploy website to Cloudflare Workers [X]
- Develop Arduino Sketch (embedded code):
- Add Bluetooth Logic [X]
- Add Active Buzzer Logic [X]
- Add Crash Detection Logic (Sonar) [X]
- Add Motor Control Logic [X]
- Add Debug LED Logic [X]
- Develop Car [X]
- Assemble car chassis [X]
- Connect motors to arduino [X]
- Connect sonar to arduino [X]
- Connect buzzer to arduino [X]
- Connect debug LED to arduino [X]
- Only supports back, forwards, and stop movement.
- Batteries to heavy for the car, so it needs a little boost to get going.
- Only two out of four motors are connected due to broken wiring (cheap car).
Note: Not all browsers support the Web Bluetooth API.
-
Connect Bluetooth Device to your PC (might require a passcode depending on Bluetooth module -
AT+PIN
command - set to 123456 through Arduino) -
Click "Connect"-Button in web app
- Great article detailing how the Bluetooth Web API works.
- Characteristic Properties Sample
- Notifications Sample
- Arduino Sample