GithubHelp home page GithubHelp logo

abhishek-2502 / bluetooth_rc_car Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 4.87 MB

This Arduino project utilizes Bluetooth communication to control a car. The script interprets commands sent via Bluetooth and directs the car's movement accordingly, including forward, backward, left, and right motions.

C++ 100.00%

bluetooth_rc_car's Introduction

Bluetooth Controlled RC Car

This repository contains the Arduino code for a Bluetooth-controlled RC car using the Adafruit Motor Shield. The code allows the user to control the car's movements (forward, backward, left, and right) using Bluetooth commands sent from a smartphone or other Bluetooth-enabled devices.

Table of Contents

Requirements

  • Arduino board (e.g., Arduino Uno)
  • Adafruit Motor Shield
  • DC motors (4 in total)
  • HC-05 Bluetooth module
  • SoftwareSerial library (for Bluetooth communication)
  • AFMotor library (for motor control)
  • Power source for the motors (e.g., battery pack)
  • Power source for the Arduino board (if separate from the motor power source)

Before uploading the code to your Arduino, ensure you have the AFMotor library installed. You can install it using the Library Manager in the Arduino IDE.

Setup

  1. Hardware Setup:

    • Connect the Adafruit Motor Shield to your Arduino board.
    • Connect the DC motors to the appropriate motor ports on the Motor Shield.
    • Connect the HC-05 Bluetooth module to the Arduino:
      • RX pin of the HC-05 to pin 9 on Arduino.
      • TX pin of the HC-05 to pin 10 on Arduino.
    • Connect the appropriate power sources to the Arduino and Motor Shield.
    • Ensure the jumper on the Motor Shield is set correctly to enable or disable the motors as needed.
  2. Code Setup:

    • Clone this repository to your local machine.
    • Open the Arduino IDE and load the .ino file from this repository.
    • Choose the correct board and port in the Arduino IDE.
    • Upload the code to your Arduino board.
  3. Bluetooth Pairing:

    • Pair your Bluetooth-enabled device (e.g., smartphone) with the HC-05 Bluetooth module.
    • The default pairing code for the HC-05 is typically 1234 or 0000.

Usage

  • After setting up and uploading the code, you can control the car using a Bluetooth terminal app on your smartphone.

  • The app should be connected to the HC-05 module, and you can send the following commands to control the car:

    • 'F': Move the car forward.
    • 'B': Move the car backward.
    • 'L': Turn the car left.
    • 'R': Turn the car right.

Media

Error

Troubleshooting

  • Communication Issues: Ensure the correct RX and TX pins are connected between the HC-05 and the Arduino. Also, verify the baud rate is set correctly in both the code and the Bluetooth terminal app.
  • Motor Issues: Double-check the connections between the motors and the Motor Shield. Also, verify that the power source for the motors is sufficient and properly connected.

Author

Abhishek Rajput.

bluetooth_rc_car's People

Contributors

abhishek-2502 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.