09 - Bluetooth Remote Control Car
Introduction
![grapebit_bluetooth_car](./09 - bluetooth car.assets/grapebit_bluetooth_car.png)
The Grapebit board, known for its cost-effectiveness as a programming controller, is often used in lightweight projects. For remote control projects, it usually requires an additional Grapebit or Future Board for ESP-NOW broadcasting, which adds to the project’s overall cost.
This project aims to reduce costs for Grapebit remote control projects by connecting a commonly available Bluetooth controller to the Grapebit board for remote control.
Materials Needed
![grapebit_bluetooth_car2](./09 - bluetooth car.assets/grapebit_bluetooth_car2.png)
- Grapebit
- Geekservo 9g Red Motor x2
- Bluetooth Controller
- Kittenbot Lithium Battery Pack
- LEGO blocks (frame beams, wheels, omni wheels)
Bluetooth Controller
We’ve chosen a standard Bluetooth controller available on the market, featuring 14 programmable buttons (the home button is not usable).
![bluetooth_gamepad](./09 - bluetooth car.assets/bluetooth_gamepad.png)
Bluetooth Car Project
To help users get started and understand how to use the Grapebit and Bluetooth controller, we’ll build a remote-controlled car.
The Grapebit can drive two motors in one direction each. It will pair directly with the Bluetooth controller, and upon receiving button commands, the Grapebit will respond accordingly.
![grapebit](./09 - bluetooth car.assets/grapebit.png)
Wiring
You can assemble a simple two-wheeled car according to your preference. Connect the two motors to the Grapebit board, and attach the Kittenbot lithium battery pack for power.
![bluetooth_car_wiring](./09 - bluetooth car.assets/bluetooth_car_wiring.png)
Quick Programming
Update Plugins and Firmware
Connect the Grapebit to your computer via USB.
Ensure the Grapebit hardware plugin is updated to v2.1.0 or higher. (If not updated, a green upgrade icon will be displayed) ![kittenblock_grapebit](./09 - bluetooth car.assets/kittenblock_grapebit.png)
Set the Grapebit into firmware recovery mode by holding down the B button and pressing the Reset button, then click "Restore Firmware" to update to the latest firmware (only needs to be done once).
![grapebit_reset](./09 - bluetooth car.assets/grapebit_reset.png) ![kittenblock_firmware](./09 - bluetooth car.assets/kittenblock_firmware.png)
Reconnect the Grapebit.
![kittenblock_firmware2](./09 - bluetooth car.assets/kittenblock_firmware2.png)
Load the Bluetooth controller plugin.
![image-20241106145615288](./09 - bluetooth car.assets/bluetooth_ controller_plugin.png)
Write and upload the program for controlling the Grapebit’s LED with the Bluetooth controller.
![kittenblock_upload](./09 - bluetooth car.assets/kittenblock_upload.png)
Turn on the Bluetooth controller and wait for the Grapebit to pair automatically (usually within 10 seconds). If pairing fails, press the Reset button on the Grapebit to retry.
![pair](./09 - bluetooth car.assets/pair.png)
Test the connection.
According to the program logic, press the up and down buttons on the controller to turn the Grapebit’s LED on and off.
![grapbit_onoff](./09 - bluetooth car.assets/grapbit_onoff.gif)
Bluetooth Car
Assembly
Assemble a two-wheeled car to your liking.
![grapebit_car](./09 - bluetooth car.assets/grapebit_car.jpeg)
Car Program
Modify the program to include motor movement. Note that the Grapebit’s two motor drives only support one-way rotation.
If the motor behavior does not match the program, try reversing the motor wires or swapping M1 and M2 motor connections.
![kittenblock_bluetooth_code](./09 - bluetooth car.assets/kittenblock_bluetooth_code.png)
Download
![kittenblock_upload2](./09 - bluetooth car.assets/kittenblock_upload2.png)
Final Result
![grapebit_car_bluetooth](./09 - bluetooth car.assets/grapebit_car_bluetooth.gif)