Arduino Dual Controlled RC Car (Bluetooth and WiFi)





Introduction: Arduino Dual Controlled RC Car (Bluetooth and WiFi)

This project will combine software and hardware using an Android app and Arduino module.

Things you will need to complete this project:

1. Any old, second hand or junk RC Car

2. Arduino nano

3. HC-05 / HC-06 Bluetooth module

4. ESP8266 WiFi module

5. L928N H-Bridge Motor Driver

6. 3.3V Regulator

7. Servo Motor for turning the wheel

8. FTDI232 USB to TTL Serial Converter Adapter Module 3.3V 5V FT232RL

Step 1: Flashing Esp8266

Download all the necessary files for flashing the esp8266 module here:

And follow the steps from this instructables.

Step 2: The Connection

To put all the modules in RC car, I've cleaned the chassis to make room for the electronic devices.

You can now follow the connection from the image. Then download this app to control the RC car:

Arduino code is available on the app.

To see how this actually works:

Thanks and enjoy!.

Step 3:



    • Planter Challenge

      Planter Challenge
    • Make it Move Contest

      Make it Move Contest
    • Casting Contest

      Casting Contest

    We have a be nice policy.
    Please be positive and constructive.




    hi josapedm

    could you please leave the full Arduino code here?

    or it will be wonderful if you could email it to me.

    i wasn't able to copy the arduino code from the mobile app and I wasn't able to extract it at all.


    7 replies

    Sure. I'll paste it here. I can also send it to you if you want. Just give me ur email so I can give u the .ino files, it would be more convenient.

    hey can you send the ino file to me?? please

    Hi, it's in the comment below. Try to look at it.

    Its different from code in your app...
    And you have video can make it easier in flashing esp8266 or sugestion video from youtube may be..

    What exactly you need? The ino file or how to flash esp8266?

    You can give me your email by the way if you need the ino sketch.

    Both of them ..

    thanks a lot

    could you please just paste it here.

    I really thank you

    Sir you can send arduino full code this app

    hello Mr. josapedm.

    I hope you are fine. I want to make a both bluetooth and arduino controlled car.

    and let me tell you that its my first arduino project.

    it seems from your avobe soft that you are controlling your car only by wifi.

    can you tell me how can I controll it with bluetooth also???

    1 reply

    Bluetooth controlled is easy to do, just follow the wiring diagram i have posted here.

    i want to use simple motor instead of servo motor so what to program for working of simple motor

    1 reply

    You mean arduino sketch?

    I cant seem to find the code for the Arduino, the app doesn't seem to have the provision for loading it. I'm using a Galaxy S5 and the app looks much different than the example.

    5 replies

    Arduino code


    // servo
    Servo myservo;
    SoftwareSerial esp(5,6);
    int pos = 45;
    const int analogpin = A0;
    const int pinForward = 3;
    const int pinReverse = 4;
    const int BTState = 7; // Bluetooth state on pin 7 of arduino

    // byte to receive from android
    byte cmd;
    char c;
    int motorSpeed = 0; // default speed, from 0 to 255

    void setup() {
    // setup connection

    // setup pin mode
    pinMode(analogPin, OUTPUT);
    pinMode(pinForward, OUTPUT);
    pinMode(pinReverse, OUTPUT);
    pinMode(BTState, INPUT);

    void loop() {
    motorSpeed = 100;

    // stop car when connection lost or bluetooth disconnected
    if (digitalRead(BTState) == LOW)
    c = 'S';

    if (Serial.available() > 0)
    cmd =;

    if (cmd == 'A')
    motorSpeed = 100;
    else if (cmd == 'B')
    motorSpeed = 150;
    else if (cmd == 'C')
    motorSpeed = 200;
    else if (cmd == 'D')
    motorSpeed = 255;
    } else if (esp.available() > 0) {

    cmd =;

    if (cmd == 'A')
    motorSpeed = 100;
    else if (cmd == 'B')
    motorSpeed = 150;
    else if (cmd == 'C')
    motorSpeed = 200;
    else if (cmd == 'D')
    motorSpeed = 255;

    analogWrite(analogPin, motorSpeed);

    c = cmd;

    // FORWARD
    if (c == 'F')
    digitalWrite(pinForward, HIGH); digitalWrite(pinReverse, LOW);
    // REVERSE
    else if (c == 'G')
    digitalWrite(pinForward, LOW); digitalWrite(pinReverse, HIGH);
    // STOP
    else if (c == 'S')
    digitalWrite(pinForward, LOW); digitalWrite(pinReverse, LOW);
    // RIGHT
    else if (c == 'R')
    pos = 90;
    // LEFT
    else if (c == 'L')
    pos = 0; myservo.write(pos);
    else if (c == 'I')
    pos = 45; myservo.write(pos);

    such a clever and simple approach you used to do this amazing task. i need some help on below:

    1. you used ESP in your project but i couldnt see how you are using it in code. are you receiving commands from mobile via bluetooth or wifi?

    2. I have HC-06 module. its STATE pin will tell me its connectivity status too or its only HC-05 who does this?

    3. can i have android source code for mobile app?

    i am working on similar project but to control my quadcopter. i used HC-06 succesfully but i can do good test coz i fear if BT is disconnected then i will loose my quad. i am not sure if HC-06 STATE pin really gives status of BT or no.

    waiting for your support. God bless you.

    Question 1: I'm using ESP to receive command from my Androuino App.

    Question 2: HC-06 has to state pin. You can do this using HC-05 module only.

    Question 3: Sorry it's pretty complicated to give you my Android source code.

    HC-06 state pin is not functioning. I've tried that before. You can only succeed using the HC-05 bluetooth module. It's the module I know that has a state capability in case you loose connection.

    Let me know if you have more questions. I'll be happy to response and help you. You can also check my Android App if you want to make or suggest an improvement of if you want me to add more functionality to the app so that your need will be met using my app. I'm frequently updating my App based on the demand of my users. Thank you.

    Good luck and God bless also...

    All the best,

    Thanks Josapedm for your quick response which usually lacks on such forums. i totally agree with the complexity of your sharing android code but can you just tell me which java class you used for sending data?

    for HC-06, you are right that state pin doesnt help u but were u able to find out what is the purpose of this STATE pin?

    from your article, i can summarise the steps as below:

    1. flash ESP with nodemcu_integer_0.9.6-dev_20150406.bin you put on github

    2. connect ESP with pin 5 and 6 (skip BT part as main communication is via wifi)

    3. send output to ESC to run motor

    4. send control commands from android app

    5. you are using BT just to make sure the connection with app is alive (dont we have similar function in ESP?)


    BT state usually work when the connection is lost or there's no live connection between two devices. It work like a continuous talking of two devices once established the connection.

    For the complete documentation or example code of java class. If you're familiar with Android Studio, you can view the example Bluetooth chat app from the IDE. I have used most of my java codes from this example. This is a very good starting point and I recommend it to you.

    We can achieve the same functionality using esp and this will be implimented starting from my next updated lua script.