{"id":24539143,"url":"https://github.com/marvin-vw/bluetooth_car_cpp","last_synced_at":"2025-06-10T20:36:08.867Z","repository":{"id":271108850,"uuid":"912422006","full_name":"Marvin-VW/bluetooth_car_cpp","owner":"Marvin-VW","description":"bluetooth c++ car","archived":false,"fork":false,"pushed_at":"2025-03-03T20:15:39.000Z","size":1149,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-03T21:24:53.921Z","etag":null,"topics":["bluetooth","bluetoothserial","cpp"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Marvin-VW.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-05T14:33:40.000Z","updated_at":"2025-03-03T20:15:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"c84194cc-6425-495f-b522-c6ca0f5dca51","html_url":"https://github.com/Marvin-VW/bluetooth_car_cpp","commit_stats":null,"previous_names":["marvin-vw/bluetooth_car_cpp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marvin-VW%2Fbluetooth_car_cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marvin-VW%2Fbluetooth_car_cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marvin-VW%2Fbluetooth_car_cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marvin-VW%2Fbluetooth_car_cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Marvin-VW","download_url":"https://codeload.github.com/Marvin-VW/bluetooth_car_cpp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243822308,"owners_count":20353498,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bluetooth","bluetoothserial","cpp"],"created_at":"2025-01-22T16:15:34.626Z","updated_at":"2025-03-16T03:40:23.053Z","avatar_url":"https://github.com/Marvin-VW.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bluetooth Car C++ Code\n\n\u003cimg src=\"car_wiring.png\" width=\"500\"/\u003e\n\nThis project allows you to control a car connected to an ESP32 board via Bluetooth. The devices include a steering servo, LED underglow, motor, and distance sensors. The system uses Bluetooth to receive commands and send sensor data at regular intervals.\n\n## Hardware Requirements\n\n- **ESP32 with Bluetooth**\n- **Servo (MG90S)**\n- **LEDs**\n- **Motor driver (L298N)**\n- **Ultrasonic Distance Sensors (HCSR04)**\n\n## Libraries Required\n\n- `BluetoothSerial` - To enable Bluetooth communication between the ESP32 and a mobile device.\n- `ServoDevice` - A custom class to control the servo motor.\n- `LEDDevice` - A custom class to control LEDs.\n- `MotorDevice` - A custom class to control the motor.\n- `HCSR04Device` - A custom class to control the HCSR04 ultrasonic distance sensors.\n\n## Pin Configuration\n\n- **Servo Motor**: Pin 13\n- **LED UnderGlow**: Pin 12\n- **Motor Driver**:\n  - Pin 27 (Motor Control)\n  - Pin 26 (Motor Control)\n  - Pin 25 (Motor Control)\n- **HCSR04 Sensors**:\n  - Left Sensor: Trigger Pin 17, Echo Pin 16\n  - Right Sensor: Trigger Pin 19, Echo Pin 18\n\n## Bluetooth Setup\n\n- The mobile device should be paired with the device named **\"Nissan\"**.\n- The ESP32 communicates with the mobile device using BluetoothSerial, allowing commands to control the devices connected to the ESP32.\n\n## Code Workflow\n\n1. **Setup:**\n   - Initializes serial communication.\n   - Configures each connected device (servo, underglow LED, motor, and ultrasonic sensors).\n   - Sets up Bluetooth communication with the mobile device.\n\n2. **Loop:**\n   - Continuously reads commands sent via Bluetooth.\n   - Processes commands to control the underglow LED (turn it on or off).\n   - Sends sensor data (e.g., distance) to the mobile device at regular intervals.\n\n## Commands\n\n- `underglow on`: Turns on the LED underglow.\n- `underglow off`: Turns off the LED underglow.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarvin-vw%2Fbluetooth_car_cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarvin-vw%2Fbluetooth_car_cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarvin-vw%2Fbluetooth_car_cpp/lists"}