Arduino bluetooth rc car code

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Turn an existing RC car into a Bluetooth controlled device with an Arduino and PS3 controller.

License

nsalerni/Arduino-Bluetooth-RC-Car

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Sign In Required

Please sign in to use Codespaces.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

Turn an existing RC car into a Bluetooth controlled device with an Arduino and PS3 controller.

The project is to implement an Arduino microprocessor to control the functions of a pre-built RC car. The primary objective of this project was to make the car function using a PS3 controller. To implement the functionality and use the PS3 controller, we would use an open-source PS3 controller library. With the use of this library, we are able to use the PS3 controller to connect between the PS3 Bluetooth adapter and a USB Host Shield attached to the Arduino microprocessor. Once the connection is complete, we will be able to use the buttons on the PS3 controller to perform functions such as moving the car forwards, backwards, left and right.

Alt text

The figure above shows a simple block diagram of the project. The figure shows an RC car with two motors that are connected to the Arduino Uno. Motor #1 is responsible for turning the front wheels (left and right), which is done by simply sending signals to pins 5 and 6 respectively. Motor #2 is responsible for moving the car forward and is controlled with pin 9 acting as a switch for an NPN transistor which in turn gives us enough current to power the second motor. The Arduino Uno has a USB Host Shield connected on top with a Bluetooth dongle that is responsible for communicating with the PS3 controller.

Читайте также:  Bluetooth obd ii obd2 diagnostic scanner

In order to start the project you must have the following parts:

  • An Adruino board (Arduino Uno 3 was used in the above project)
  • A USB Host Shield for the Arudino
  • A Bluetooth USB dongle
  • A PS3 Controller (the library works with Xbox and Wii controllers as well, however additional setup is required)
  • NPN Transistors
  • Various wires (of varying length)
  • Solder and a soldering iron

In order to set up the library, uncompress the zip folder (called «USB_Host_Shield_20») and rename the directory to «USB_Host_Shield_20», as any special characters are not supported by the Arduino IDE.

Now open up the Arduino IDE and open «File>Preferences». There you will see the location of your sketchbook. Open that directory and create a directory called «libraries» inside that directory. Now move the «USB_Host_Shield_20» directory to the «libraries» directory.

Now quit the Arduino IDE and reopen it. Then, you should be able to go open all the examples codes by navigating to «File>Examples>USB_Host_Shield_20» and then select the example you will like to open.

In order to test the Bluetooth dongle with the PS3 controller, open PS3BT.ino and upload it to your board. If the code does not work as is, you can find instructions on how to set up your PS3 controller with the Bluetooth dongle here: http://forum.arduino.cc/index.php?topic=137747.0.

Once your PS3 controller and Bluetooth dongle communicate successfully you can upload Project.ino to your board and have fun controlling your RC car over Bluetooth!

Note: You may also use R2 and L2 triggers on the controller to vary the speed of the motors.

About

Turn an existing RC car into a Bluetooth controlled device with an Arduino and PS3 controller.

Источник

Bluetooth Controlled Car

This is my first Arduino-based, Bluetooth-controlled RC car. It is controlled by a smart phone application.

Dual H-Bridge motor drivers L298

Maker Essentials — Micro-motors & Grippy Wheels

\t Arduino Bluetooth RC Car

Code for Arduino blootooth controlled RC Car

This is the code you will have to upload to your Arduino board.

1char t; 2 3void setup()  4pinMode(13,OUTPUT); //left motors forward 5pinMode(12,OUTPUT); //left motors reverse 6pinMode(11,OUTPUT); //right motors forward 7pinMode(10,OUTPUT); //right motors reverse 8pinMode(9,OUTPUT); //Led 9Serial.begin(9600); 10 11> 12 13void loop()  14if(Serial.available()) 15 t = Serial.read(); 16 Serial.println(t); 17> 18 19if(t == 'F') //move forward(all motors rotate in forward direction) 20 digitalWrite(13,HIGH); 21 digitalWrite(11,HIGH); 22> 23 24else if(t == 'B') //move reverse (all motors rotate in reverse direction) 25 digitalWrite(12,HIGH); 26 digitalWrite(10,HIGH); 27> 28 29else if(t == 'L') //turn right (left side motors rotate in forward direction, right side motors doesn't rotate) 30 digitalWrite(11,HIGH); 31> 32 33else if(t == 'R') //turn left (right side motors rotate in forward direction, left side motors doesn't rotate) 34 digitalWrite(13,HIGH); 35> 36 37else if(t == 'W') //turn led on or off) 38 digitalWrite(9,HIGH); 39> 40else if(t == 'w') 41 digitalWrite(9,LOW); 42> 43 44else if(t == 'S') //STOP (all motors stop) 45 digitalWrite(13,LOW); 46 digitalWrite(12,LOW); 47 digitalWrite(11,LOW); 48 digitalWrite(10,LOW); 49> 50delay(100); 51>

Источник

Bluetooth Controlled Car

This is my first Arduino-based, Bluetooth-controlled RC car. It is controlled by a smart phone application.

Dual H-Bridge motor drivers L298

Maker Essentials — Micro-motors & Grippy Wheels

\t Arduino Bluetooth RC Car

Code for Arduino blootooth controlled RC Car

This is the code you will have to upload to your Arduino board.

1char t; 2 3void setup()  4pinMode(13,OUTPUT); //left motors forward 5pinMode(12,OUTPUT); //left motors reverse 6pinMode(11,OUTPUT); //right motors forward 7pinMode(10,OUTPUT); //right motors reverse 8pinMode(9,OUTPUT); //Led 9Serial.begin(9600); 10 11> 12 13void loop()  14if(Serial.available()) 15 t = Serial.read(); 16 Serial.println(t); 17> 18 19if(t == 'F') //move forward(all motors rotate in forward direction) 20 digitalWrite(13,HIGH); 21 digitalWrite(11,HIGH); 22> 23 24else if(t == 'B') //move reverse (all motors rotate in reverse direction) 25 digitalWrite(12,HIGH); 26 digitalWrite(10,HIGH); 27> 28 29else if(t == 'L') //turn right (left side motors rotate in forward direction, right side motors doesn't rotate) 30 digitalWrite(11,HIGH); 31> 32 33else if(t == 'R') //turn left (right side motors rotate in forward direction, left side motors doesn't rotate) 34 digitalWrite(13,HIGH); 35> 36 37else if(t == 'W') //turn led on or off) 38 digitalWrite(9,HIGH); 39> 40else if(t == 'w') 41 digitalWrite(9,LOW); 42> 43 44else if(t == 'S') //STOP (all motors stop) 45 digitalWrite(13,LOW); 46 digitalWrite(12,LOW); 47 digitalWrite(11,LOW); 48 digitalWrite(10,LOW); 49> 50delay(100); 51>

Источник

Arduino bluetooth rc car code

Rather than buying something, make it.

Browse thousands of projects created by the Arduino community

793802 views • 605 comments • 415 respects

Arduino Based Mini CNC 2D Plotter

164907 views • 40 comments • 214 respects

212352 views • 90 comments • 57 respects

Ultrasonic Security System

162658 views • 142 comments • 188 respects

Measure Heart Rate and SpO2 with MAX30102

321618 views • 154 comments • 244 respects

156965 views • 63 comments • 60 respects

Share and Compete in Project of the Month!

Unlock amazing rewards by submitting your project today.

Create projects fast, with no coding

Import, use and customize ready-made templates for your IoT projects

Dream big, we will take care of the rest

See what you can create with Arduino Cloud

White Mountains Regional High School

Discover how this school is working with remote sensing applications that allow them to do things like automate lighting, regulate temperature, adjust humidity, and check on the greenhouse from their phones.

Smart ovens take a leap into the future

How a strong partnership and the Arduino Portenta Machine Control led historical company Rinaldi Superforni to revolutionize their business

The new Portenta X8 and Max Carrier

Industrial Arduino and Linux combined to get the best of both worlds

Источник

Arduino bluetooth rc car code

Rather than buying something, make it.

Browse thousands of projects created by the Arduino community

793802 views • 605 comments • 415 respects

Arduino Based Mini CNC 2D Plotter

164907 views • 40 comments • 214 respects

212352 views • 90 comments • 57 respects

Ultrasonic Security System

162658 views • 142 comments • 188 respects

Measure Heart Rate and SpO2 with MAX30102

321618 views • 154 comments • 244 respects

156965 views • 63 comments • 60 respects

Share and Compete in Project of the Month!

Unlock amazing rewards by submitting your project today.

Create projects fast, with no coding

Import, use and customize ready-made templates for your IoT projects

Dream big, we will take care of the rest

See what you can create with Arduino Cloud

White Mountains Regional High School

Discover how this school is working with remote sensing applications that allow them to do things like automate lighting, regulate temperature, adjust humidity, and check on the greenhouse from their phones.

Smart ovens take a leap into the future

How a strong partnership and the Arduino Portenta Machine Control led historical company Rinaldi Superforni to revolutionize their business

The new Portenta X8 and Max Carrier

Industrial Arduino and Linux combined to get the best of both worlds

Источник

Оцените статью
Adblock
detector