Building and Controlling 4WD Arduino Robot using Android Joystick App
Вставка
- Опубліковано 5 лют 2025
- This video demonstrates the steps to assemble out-of-the-box 4WD Arduino robot. All you need is just an Arduino board, a dual channel motor driver shield, a bluetooth module (eg. HC-06) and a 7.4V LiPo battery pack. The robot is finally controlled within minutes by an Android joystick app available on Google Play.
To get the Arduino sample code, just click this link: goo.gl/iDCNqU with the help of circuit diagram here: goo.gl/L3k9X8. Commented code: goo.gl/bZpL66 (added on 22 Feb 2018).
If you happen to use "ArduMoto" board as the motor driver as shown in this picture (goo.gl/xPSxUK), you may simply use this sample code: goo.gl/7H5hAx using this schematic diagram as the guidance: goo.gl/RyWeAx.
Or if you prefer the classic L298N type of motor driver as shown in the picture here (goo.gl/ZL0NlE), or in the video here ( • L298N: Building and Co... ) and the circuit diagram here (goo.gl/m7E8RR), then use this sample code: goo.gl/B5DHym.
Or else if you choose to stick with the 'super classic' Adafruit L293D Motor Driver Shield as shown here (goo.gl/AkVLsP) and here (goo.gl/xZEvM6), you may get the code here: goo.gl/YWJYfW with the help of circuit diagram as shown here: goo.gl/57rckQ. If you want to control 2 additional motors (like blade or arm actuator) on the robot, use this code: goo.gl/ME6NYf.
Having L9110S motor driver module? Then use this code: goo.gl/WmnDM9 (Viewer's contribution - Thanks Philip!)
Add the HC-SR04 ultrasonic sensor to your robot by referring to this schematic: goo.gl/xfujQD (for L298N) or goo.gl/e3X3H7 (for L293D).
Get the Arduino code for L298N here: goo.gl/rVprd9 and for L293D here: goo.gl/tMlBUU.
Watch this robot which uses the L293D Motor Shield being controlled autonomously by a color tracking app here: • Controlling 4WD Arduin... .
Watch this app controls 2 servo motors simultaneously here: • (HD) Controlling Servo... .
To watch the joystick app controls 3 wheeled omnidirectional robot, click here: • Controlling 3 Wheeled ... and here: • Controlling 3WD Omni A... (Newer video).
Check out my new video of omnidirectional robot being controlled using Android smartphone via image processing (color tracking approach) at • Android-controlled Col... .
Happy roboting! Thank you.
Background Music: "Little Idea" & "Love" - Bensound.com
Joystick app on Google Play Full version (now equipped with Serial Monitor window which functions just like the Arduino IDE's Serial Monitor, but in mobile way, integrated with the app. Other than that it is also capable of producing omnidirectional 4WD output beside of omnidirectional 3WD or the 2WD/4WD differential drive and the raw X and Y joystick coordinates):
goo.gl/2oMk0S
Joystick app Free version:
goo.gl/CWynPX
Joystick app Lite version:
goo.gl/xHtnZb
Joystick app Lite Free version:
goo.gl/58zAtg
BT Serial Monitor:
goo.gl/1lW49f
BT Serial Terminal:
goo.gl/Nqg7rx
You may test out the new feature of Serial Monitor window on the Arduino Robot Joystick app using L293D motor driver by referring to this circuit diagram: goo.gl/DGEjKF and Arduino code: goo.gl/vaJeDj and additional reference pictures here: goo.gl/pvO4je. Make sure you use version 1.11 or higher of the app to use this new feature. A very quick tutorial video is available here: • Controlling 4WD Arduin... . The description on how to use the app for this project is attached in the given Arduino code in comment block form.
Now you can track your device's current location for real-time people and property surveillance purpose using Telegram Messenger via this TeleGPS app: goo.gl/0umbFO.
Display your messages at ease using LED display matrix through Bluetooth communication here: • Controlling LED Matrix... .
Watch my new videos featuring a 3WD omnidirectional robot performing obstacle avoidance task at • 3WD Omni Robot: Obstac... and localization challenge at • 3WD Omni Robot: Locali... using Android smartphone as the main controller to carry out image processing job through color detection approach. For training session, watch it at • (HD) 3WD Omnidirection... .
Another latest video: A soccer ball kicking mechanism (solenoid kicker) at • Ball Kicking Mechanism... . Have a look! Thanks!
Wow man your flippin great, your nearly the only guy who not only systematically answers peoples quetions but you edit and re write their code. I can`t believe it. I`ve been looking for this for ages to controle my 4WD electric wheelchair.
Hey thanks buddy! So how's your electric wheelchair? Is it controllable using the app now? Feel free to share the video with me!
This is the app I have been needing for my robot for a LONG TIME, THANKS!!
+king of the awsomeness
You're welcome :)
Mate, I loved your free version so much, I bought the full version. Great App. Keep up the good work.
Thank you very much! I'm so pleased to hear that :)
can i connect the bluetooth module to the 6 pin on the l293d motor shield?...plz reply sir i want it urgent
Yes. Just modify the line "SoftwareSerial mySerial(A2, A3);" in the code to "SoftwareSerial mySerial(6, A3);". Then connect the TXD pin of the BT module to pin 6, without bother to connect the RXD pin (RXD pin is unused).
can i connect three pin writing 'SoftwareSerial mySerial (3,A3)
Discover with Debashis Yes you do.
tnx.. sir
sir... can i use ultra sound sensor here..
yes I did. this set up works when I was using it as a obstruction avoidance robot..
Are you sure you have connected the TX pin of the BT module to RX pin of the Arduino and vice versa?
thanks so much but do you think it is suitable for using it for drone?
In the big chip in arduino board it writtend ATMEGA328P-PU and in the board it written arduino uno with arduino sign then which board shoul i select in the TOOLS>BOARD>........?
Select Arduino Uno from the list. We don't care what chip it uses, what we care is only it's board model
Did checked the mail which i sent to you
can show me how u make the app for this project
Yes I did that. I am using OSEPP motor shield to drive the motors..
I just checked the documentation of the OSEPP motor driver. Try to change 'digitalWrite(MR, HIGH);' in the 'void process()' function to 'motorRight.run(FORWARD);' and 'digitalWrite(MR, LOW);' to 'motorLeft.run(BACKWARD);'.
Do the similar thing to ML part and don't forget to define motorRight using AF_DCMotor motorRight(7, MOTOR12_64KHZ); and AF_DCMotor motorLeft(4, MOTOR12_64KHZ); for motorLeft.
Next, for analogWrite(EL, elp); and analogWrite(ER, erp); lines, change them to motorLeft.setSpeed(elp); and motorRight.setSpeed(erp); and see what happens.
I am a student from Nepal. And I have my competition tomorrow and I loved your Arduino Robot Joystick and have perfect function for my project. I would love to pay but I can’t pay, since we don’t have such online paying system in Nepal. So please provide your app....
it can be connected to any pin or to the last one
It must follow the correct pins' name
Pls send link for the chassis kit
Using the "super classic" L293D driver, why is the rxd pin on the bluetooth module not used? Don't you need 2 way communication? Also, I'm only doing 2 wheel drive, can I still use this sketch?
Well, it depends to us either to use 2 way communication or not. In controlling the robot, one way communication will do as we just need to send commands to the robot, not vice versa. However, if you use the latest version of the joystick app which equipped with on-board serial monitor, you can use the new feature by using 2 way communication, which will have the current status of the robot being displayed on the app's serial monitor window.
Thanks for the quick reply. Yes I see your point, I read through the comments and did see your reply to one of the other commentors about this. So what would the code and the extra pin# be if I wanted 2 way communication. I am trying the code for the L239D driver and a 2 motor tread driven tank. Thanks again for the help.
Just connect the RXD pin of the Bluetooth module to the TX pin on the Arduino, which is positioned next to the RX pin that we assign. To make the Arduino display its current status on the serial monitor on the app, just use the Serial.println command.
For example, adding this line in the "void processx()" function will make the app display "Button x pressed" on the serial monitor window:
Serial.println("Button x pressed");
Similarly, adding this line in the "void process()" function will make the app display the speed value of left motor:
Serial.println("Left speed: " + String(x));
Or this line to make it display both of left and right motor's speed:
Serial.println("Left speed: " + String(x) + ", right speed: " + String(y));
Please note that the above code is equivalent to:
Serial.print("Left speed: ");
Serial.print(x);
Serial.print(", right speed: ");
Serial.println(y);
which the above one is compressed into a single line of code.
Thanks :-)
You are welcome :)
For L298N type of motor driver code link is not opening please help
I connected HC-05 Bluetooth Gnd and 5v to arduino and Tx to the Rx is this correct
Yes, that is correct
can i use any app to control this rc car
Discover with Debashis Yes, as long as the Arduino can decode the string you send from the app. So you need to create a protocol that can be understood by the receiver which in this case the Arduino.
so how to Create a protocol for an app or how to create a app for this project...can u plz help me...
Discover with Debashis You can refer to this video: ua-cam.com/video/aisWoABmugQ/v-deo.html.
It uses Bluetooth Serial Terminal app to send commands through alphabet characters that will be received by Arduino and respond by turning on or off the appropriate LEDs. That's one of the simplest protocol/format that you can try out yourself.
Which software or site use to build app
will it damage the ardiuno and BT module or just motor's
Just the motors
Hi, if i use 11.1v 3000mah battery pack will it burn the motor ? im using L298N as the motor driver. Thank you.
Hi, it depends to the voltage rating of your motor. Some BO (battery operated) motors use from 3 to 6V of voltage, and some of them can handle up to 12V. But mostly, as far as I know, for the Arduino robot they use the low voltage type which is the 3-6V one, so in this case using the 11.1V is not recommendable.
I see.. thank you very much!
You are welcome :)
which channel did u insert ....i mean the siren and led.....will u specify for A B &C....
Roshan Anil Hi, you can use any channel for the siren and LED, either pin A0, 11 or A1 according to the sample code. Pin A0 will respond to button A, 11 to button B and A1 to button C. Pressing each button once will trigger the respected pin connected to it and pressing it again will deactivate the pin (toggle action). You can specify other pins as you wish as long as the pins are free to use. Hope that helps.
Nudge Me thanks a lot bro....
Nudge Me and bro sorry. ....
ur video is amazing......u rock dude...coz of the help which i give in respect to motor shield......and the content n video editing is marvelous....good job
Roshan Anil Thank you :)
Hey it's working ,but I need help
I want to make my bot as soccer bot so can you tell how to connect small motor so that it can hit the ball or tell me how to connect motor to the button A B C or X Y Z .
Linc Animation Hi, if you want to use button A, for a test purpose just connect a buzzer to Arduino's pin A0 (positive of buzzer to pin A0 and negative of buzzer to GND). Then press button A once. You will see the buzzer make sound and when you press the button A once again the sound turns off. So what to do next is just replace the buzzer with the small motor you have. A vibrator motor can be driven directly through the pin A0 while a larger motor may need a relay module or another motor driver module to operate.
In the code, button B reacts to pin 11, button C to pin A1 and button X, Y and Z still don't have any pin assignment on them. You can modify the code to make the button react to other pins you like by following the code pattern. Thanks.
Hi Nudge Me !
Your project is very interesting.
I want to asked you if it is possible to control 2 motor shield which are IMS-2C as with its PWM to control its speed and when turning to right and left.
It would be increamented in a wheelchair project !
Hi, I have viewed the specifications of the IMS-2C motor driver and theoretically it should be possible to control it (or 2 units of them) using Arduino and this app too via PWM control method.
So that i can used it is must rewrite your code to my use !?
Thanks for your quick answer!
During this process could i have some help with you if possible ?
B.Dylan peace After looking at its use instruction I think the code needs a slight modification.
Nudge Me I will work on it !
And afterward would i be able to have some help with you ?
B.Dylan peace I will help you as much as I can..
All done bluetooth also connected in your video bluetooth light is stoped but for me it still blinking
The BT module needs to stop blinking to indicate that it has successfully bonded between two parties
+Nudge Me what should I do know ??
+Gokul spidey mine is HC05
why bluetooth is blinking even after connected??
can this same procedure be done with polulu dagu rover 5?
Yes :)
thanks man :) i'm using 2 motor 2 encoders
also thinking of putting a night vision camera on to the front.. not sure what to go for though do you know any good recommendations?
I don't really know much about those night vision cameras but try to take a look at Night Vision Camera app available on Google Play. Although it is totally software based, it seems to work well though..
and this could work with just smartphone?
sir , what is the difference between your project and obstacle avoiding project ?
Hi, this project focuses on controlling the 4WD robot via remote control while for obstacle avoiding one, this video may be your answer: ua-cam.com/video/3o3mJYype7E/v-deo.html.
tq sir
Welcome
There was a question I was going to have you in a project Arduino serial port controlled robotic arm wondering if you could help us G = body K = arm has 4 servo motors , etc. We provide how to control ... sample series pot G50 type of partition abrasive discs connected to the servo motor 50 degrees how come we do it
Hi, the first thing to do is to test the communication of the app with the servo motor through BT serial.
Download and open my Arduino sample code from the link above, go to "void processa()" function and edit it like this:
void processa()
{
Serial.println("Button a pressed! ");
StatePin9 = !StatePin9;
if (StatePin9 == true)
{
Serial.println("Setting servo to 150°");
myservo1.write(150);
}
else
{
Serial.println("Setting servo to 30°");
myservo1.write(30);
}
Serial.flush();
}
On the top/beginning of the code add these lines:
#include
Servo myservo1;
boolean StatePin9 = false;
And in the "void setup()" function place these lines:
void setup()
{
myservo1.attach(9);
pinMode(9, OUTPUT);
Serial.begin(9600);
Serial.println("Start");
}
Upload the code to Arduino board, connect it with BT module, pair with your phone, establish the connection between the BT module and the app, press button "a" few times and see what happens.
Hope that will give you some idea on your serial to servo project.
Thank You :)
So I noticed in the L298N code it says to connect the TX pin from the Bluetooth to the A2 pin on the Arduino. If you check the schematic and the sample picture you posted you have the TX from the Bluetooth connected to the TX (Pin 1) on the Arduino. This might be why some of the beginners are having troubles using the L298N motor driver.
Hi, thanks for your comment. May I know which L298N code and schematic were you referring to? Because AFAIK only the code for L293D directs users to use A2 and A3 to be the TX and RX pin, and so does the schematic.
goo.gl/m7E8RR refers to L298N schematic that uses Pin 0 and Pin 1 and it matches with the Arduino code at goo.gl/B5DHym which does not contain any SoftwareSerial header at all.
On the other hand, the schematic for L293D at goo.gl/57rckQ suggests to use A2 and A3 which matches the code at goo.gl/YWJYfW.
Can you show me where the mistake I made? Thanks!
my bad, you are right, I was looking at the wrong one. I had the L293D code open because it has notes on the code and the L298N didn't and apparently I lost track of what I was looking at. Forgive my ignorance.
Thank God I did it right. It's okay BTW :)
Hi,can you help me? I would like to know the project's measures
And the coneccion on fritzing
(Arduino)
And the programation in arduino
What do you mean? The cost or the dimensions?
hi my name is ananthu .can I use l293D motor driver?which code shall I use.can I use the chord for l298N.
Vineetha Unni Hi, you need to use the code that matches your motor driver type. If you use the L293D, then you need to use the code provided for the L293D, hence with the schematic.
Hello Sir I have used l293 adafruit shield which button from the app I have to use to run servo motor and which app should I download to run these shield
Hi, you may get the code here: goo.gl/YWJYfW with the help of circuit diagram as shown here: goo.gl/57rckQ. If you want to control 2 additional motors (like blade or arm actuator) on the robot, use this code: goo.gl/ME6NYf.
What means the number following "@"? angle?
how are motor left and right speeds determined then?
All of the numbers represent speed. For 2WD or 4WD differential drive mode, the one that follows right after ~ is left wheel speed and the next after * is right wheel speed, and two numbers after @ and . represent nothing and you can ignore them.
On the other hand, for 3WD omni wheel mode, the first number represents forward right wheel speed, second represents forward left wheel speed and the last one is for rear wheel speed. For the 4WD omni wheel mode, the last two numbers are for rear left and rear right wheel speed.
If you want to use the magnitude and angle mode, just click either second checkbox or the third checkbox located under the box that shows something like ~0*0@0#, and not forgetting the middle small checkbox that is located at the bottom of the screen (you need to hide the serial monitor window to access these check-boxes).
The left and right wheel speeds are determined using a trigonometric equation under the hood. Hope this helps. Thanks!
Alright, thank you! clear
hey dude can u give the circuit diagram if i am using l298n motor dr8ver
Hi,
Circuit diagram: goo.gl/m7E8RR
Sample code: goo.gl/B5DHym
pins behind 12v of motor driver also shorted . but car not working please reply fast
hi bro, may i ask what should i add to the code if i want to have some reading in ultrasonic sensor and is it possible to display in serial monitor?
hey dude can u help me out to wire this circuit if i am using L298n motor driver
Hi,
Circuit diagram: goo.gl/m7E8RR
Sample code: goo.gl/B5DHym
Thanks man you're great!!!
Really like your app but am having difficulty using an L9110S motor controller. Forward/reverse work fine, but left/right are reversed. Any suggestions?
Hi, first of all, which code did you use?
HI, I'm using ArduinoRobotJoystick4WD_L298N.ino but its only a 2WD vehicle. Right motor pins 4(MR) to A-IB, 5(ER) to A-IA, Left motor 6(EL) to B-IA, 7(ML) to B-IB. Motors are wired identically to the controller.
Hi, sorry for late replying. Try this code: goo.gl/Sn1TTj. I have modified it based on example code from www.bananarobotics.com/shop/How-to-use-the-HG7881-(L9110)-Dual-Channel-Motor-Driver-Module. Any success/failure please let me know. Thanks!
Thanks for the quick response. I tried the code, but no joy. If the direction is HIGH, PWM must be 255-abs(speed) or 255+speed when speed is negative. Tried that change and still no joy. Forward/reverse ok but left/right still reversed. Thanks again for your help.
So have you tried something like
analogWrite(EL, 255 - elp);
and
analogWrite(ER, 255 - erp);
in your code?
can i use a motor drive shield instead of a motor drive its different from yours
Yes, any kind of motor driver/shield should be possible.
can I use arduino motor shield instead of dual channel motor driver
Yes of course
Nudge Me:
I also use this model of motor driver for my robot: goo.gl/hhBfWS, goo.gl/mdzoxb
Hello sir.. you helped me alot before so now i want to know is .. i want to use 6 motors of 12 volts and 60 rpm so which motor driver shield i have to choose (L298N or L293d) ? please do reply sir :-)
sudip thapa Try to use L298N for that purpose. However, there are only 2 output channels available on the L298N motor driver so you need to connect 3 motors per channel (means every 3 motors will have same movement) or use additional L298N to control all the motors (so that all or some of the motors will have different control). You can refer to this video: ua-cam.com/video/MBs023AoHQk/v-deo.html to get the idea of the circuit connection.
Thanks sir, and this programs what is A0 and A1 (Boolean state )
Welcome. The Boolean states "StateA0", "StateA1" and "State11" are just variables used by button A, B and C to toggle the state of pin A0, A1 and pin D11 on the Arduino board, either "HIGH" or "LOW", for special purposes such as triggering the weapon, horns, lights and so on. These buttons are optional to be used in this 4WD robot control. The name "StateA0", "StateA1" and "State11" are totally just names, which you can rename them to any name you like, such as "state1", "state2", "state3" or even "myConditionA", "myConditionB" and so on, or don't use them at all, because the motion of the robot is solely dependent on the joystick knob in the video.
What part of the car controls steering? Is there a fifth wheel? The 4 wheels don't look like they can physically turn
No, there is no fifth wheel. Only those 4 wheels that make the robot go forward, backward, do cornering or rotate. That's how 'differential drive' principle works.
Hey, thanks for the quick reply! I assumed that the wheels rotating at a different rate was what controlled steering but I wanted to make sure
Do you mind if you provide a link to where you got the chassis kit?
Thanks man!
Sorry for all the questions, but how did you mount the Arduino to the car's chassis? Are there screw holes that align with the Arduino?
There are no screw holes that align with the Arduino. Fortunately, the position of robot's wheel holders coincidentally match the size of the Arduino board, so I just insert the board between those 4 holders and it fits well there :)
when we use l298n h bridge motor driver , then dose we need to give power to ardiuno by other sources. l298n h bridge is already connect as show in your diagram.
Yes, certainly we need to power up the Arduino using external power, or just share the power from the battery to the motor driver. This can be done by connecting the 12V terminal on the motor driver to the pin VIN of the Arduino (not the 5V pin!) beside connecting it to the battery. You are right, the diagram does not show this connection, but the sample picture does (goo.gl/ZL0NlE). Thanks!
can you contact me on Wats app
Nudge Me thank you so much.❤ And keep uploading vedio.
to control the car using l298n h bridge and ardunio. I have uploaded the code give in the link
Hey I am stuck. I have done all wireing and uploaded the code but when in connect to your app the bluetooth hc-065get off and blinks some times . I have used class l298n h bridge motor driver. please Help me
Hi bro what if i want to add 2 more channels should i add something in your codes? . thanks
What library it should be in..
If you are referring to the Arduino code's library, there is no library needed for this project. Just download the sample code from the link given and you are ready to go.
thanks for you reply
Can i Get code for adding ultrasonic and buzzer to the robot
and were i can connect them
+Gokul spidey For the buzzer, you can connect the positive terminal of the component to pin 7 and the negative terminal to GND pin of the Arduino board. Then in the sample code, place "pinMode(7, INPUT);" inside 'void setup()' function and in the 'processb()' function, do this modification:
void processb()
{
Serial.println("Button b! ");
State11 = !State11;
if (State11 == true)
{
digitalWrite(7, HIGH);
}
else
{
digitalWrite(7, LOW);
}
Serial.flush();
}
This code will make the robot plays buzzer when Button B is pressed and turn it off is the button is pressed again.
For the ultrasonic sensor, please refer to the comment and replies with Raffaele Mammoliti in this comment section.
how to add led function light up?
Hi, from this link: goo.gl/iDCNqU see this function in the code:
void processa(){ //button a pressed
Serial.println("Button a! ");
StateA0 = !StateA0;
if (StateA0 == true) { digitalWrite(A0, HIGH); } else { digitalWrite(A0, LOW); }
Serial.flush();
}
Connect an LED to pin A0 and press button A. The LED will light up. Press the button A again and it will turn off and so on. You can change the pin to other pins you prefer, such as 5, 6, 11 or 12 as long as the pins are not used by the motor driver. Don't forget to declare the pins as 'output' otherwise it won't work. Thanks.
can I use 9v battery instead of 7.4v
For the Arduino, it would be no problem if you use VIN pin as the voltage will be regulated to 5V by on board voltage regulator, and so with the BT module. However, for the motors, they may still work but exceeding the voltage may damage or at least shorten the lifespan of the motors
Nudge Me can u teach me how can make the same car comes to us automatically without using the joysticks to us with a push of a button?? It would be really helpful n your help really appreciated... thank you...❤
i tried your l293d shield car it is not working
a sound is hearing i dont know what it is
Many things could be the factor. Since you said you are a beginner, I cannot tell what the exact thing could be the problem.
pls help me
can you send me link for your motor driver which you used in video exactly the same one
www.dfrobot.com/index.php?route=product/product&product_id=69#.V5sNaNJ96Uk
Can you provide the commented code for the L298N version with the proximity sensor.
Hi, L298N code is not much different with the other codes, so you can refer to L298P motor shield's commented code here: goo.gl/6qtrE3. If you want to add the ultrasonic sensor, refer this code: goo.gl/6qtrE3 (L298N connected to ultrasonic sensor). This code however is not commented, but you should get the idea once you have referred to the previous code. Thanks.
Alright, do you think i could use the same code that i used for L298N for L293N IC chip and just changed the pins
L293D code uses Adafruit Motor Shield library while L298N does not. There is a slight difference there. Worth to take a look into the codes first.
you are the best man you are the polla
Circuito Cerrado Gracias! 😎
When I add the ultrasonic sensor when using the L298N the car just goes forward at full speed, it stops for the delay then does it again, it doesn't really identify any object!
Isaac Pena Hi, try to add some delay here:
if (distance
I try to change pin 11 wit pin 3 and now button 'B' move right wheels.
Now I have to rewrite the sketch with the correct pin.
I do not know if I will be able to do
ciao
Ok.. hope it will be done successfully..
please give your email id
If you give your e-mail address I write to you
ciao
Raffaele
gokulspidey5@gmail.com
Bro I have connected the Rx pin of bluetooth module to Tx and Tx pin of Bluetooth to Rx pin.
But the bluetooth is not being connected with my phone .
Have you paired the BT module through your phone's Bluetooth setting menu?
Yeah I have paired but after pairing it doesn't show in available devices.
So strange.. All the successfully paired devices should be listed in the paired device list..
Okay bro no problem. Thanks for your help !😊
sir thank you so much and i have build successfully auduino Bluetooth car and i want to some help to you, sir can i use same app to light, horn how to connection light and horn please help me
Gyanaranjan Panda You are welcome! By default, the sample code is already set to work with the app's button A, B and C. Pressing the button A will trigger the Arduino's pin A0 on and off, button B triggers the Arduino's pin 11 and button C triggers the pin A1. So what you need to do is just connect an LED to one of these pins to be the car's light, and connect a buzzer to another pin to be the horn.
sir thank you so much , and robot car moving but I facing another problems that Bluetooth connection lost after few second and robot car starting suddenly few second connection are lost please help me .
Try connect the VCC pin of your HC05 module to 5V of Arduino instead of 3.3V. Maybe your robot draws too much current from the battery hence affects the BT module.
Hello sir!!..
How to make joystick application??
what will be the code for 4 motor (To move forward, back, left and right)
i'm using 2 L293D ic to drive the robot
1 L29D for left front motor and left back motor
other for right front motor and right back motor
plz help
So you are using ICs only, not motor driver module/shield?
no
only two ic
how to move forward ??
need to drive all motor in forward direction
or we can only need to drive back two motors in forward direction ??
Try to connect 2 motors to 1 IC first and get it to work. After that you just duplicate the circuit to make the other 2 motors to work with another IC. After that then you can combine those two circuits into one..
Try this code: goo.gl/j3hyvo, modified to suit your project.
The circuit can be referred to www.instructables.com/file/FKT06QMICRXPLI6/ which located at www.instructables.com/id/How-to-use-the-L293D-Motor-Driver-Arduino-Tutorial/ (thanks to the author). Just follow the same connections from the IC to the Arduino except pin 1 of the IC needs to be connected to pin 3 of the Arduino and pin 9 of the IC to pin 11 of the Arduino.
same power supply using powerbank for ardino and motor driver
can you tell me how is name of the motor shield please
Cablo Idrizi Hi, you may find the motor shield here:
www.dfrobot.com/index.php?route=product/product&product_id=69
men ichi thanks
If i'am use power bank for arduino board,It can use?
Yes, you can use power bank to power your Arduino board
thanks
I can replace the control by bluetooh by modules of rf 433 hz, to obtain more scope
Hi, the app itself doesn't support connection other than Bluetooth for the time being, so maybe it cannot be done for now
so what about the code
the thing is that i am new to all this stuff and i chose this as my Integrated Project and i really want your help.
i have to make this same car controlled via wifi and keep a spy camera that too controlled by wifi
and i wanted to know how much it would cost me to make this project with wifi controlled
the code for wifi controlled ??
how much power to give l293d motor shield and arduino uno
Anuj Singh Try a 7.4V LiPo battery..
thanks a lot,
now I load schetch on board arduino1 but I have a problem.
I used motor shield L298P (most easy to buy) and here there is not PWRIN.
Apps is OK, it see correcty bluetooth but only 'B' button moves the left wheel.
Any idea?
ciao
Raffaele
Hi, if your motor shield does not have PWRIN jumper, ignore it. Just connect the battery to the + and - terminals (other than M1+, M1-, M2+ and M2- terminals for DUAL channel motor driver). Next, check your motor shield's reserved pins (the pins to control direction and speed) as it may use different pins from what were declared in the code. From the code, it seems that button 'B' respons to pin 11. So I think that your motor driver uses pin 11 as one of the reserved pins beside three other pins. Hope that helps..
Which website can I buy the car with all the components?
claudiu foca Hi, you can try find them on Ebay or AliExpress.com..
hi, Do you have a tuto for the creation of the application in the mobile ?thank you.
giguerre lansh Hi, sorry, for the time being, I don't have the tutorial to build apps.
sir in your code x=Serial.parselnt(); but showing error so I use x="Serial.parselnt ()"; .that problem I confused which one correct
The original one is correct. I wonder how it generates error in your case.
What error did it show?
yes sir you telling true that problem and how solve this problems.
The problem happens when you click on Compile button or when you click the Upload button?
Hi Nudge Me, I need the complete materials or parts list of this robot for my project.... please reply to me as soon as possible
Hello, to build this robot, you need:
1. A 4WD robot chassis kit with motors and wheels
2. A 7.4 LiPo battery (capacity doesn't matter - capacity is denoted in mAh value)
3. An Arduino Uno board
4. A HC-05 or HC-06 Bluetooth module (other types may also possible)
5. A motor driver shield/module (either L298N, L298P, Ardumoto, L293D or etc)
6. Suitable dupont jumper wire
7. Controller app
That's all. Hope this helps.
Thanks a lot!!!
You are welcome!
sir please send me code and diagram connection of ultrasonic sensor I want play both ultrasonic sensor for obstacles avoid and play Bluetooth car. ,I using l298n motor driver and Bluetooth hc 05 ,arduino uno.
If you use L298N, use this code: goo.gl/rVprd9 and this shematic: goo.gl/xfujQD.
Else, if you use L293D, then use this code: goo.gl/tMlBUU and this schematic: goo.gl/e3X3H7.
I have a setup similar to yours and it doesn't work.. Can you help?
Which part that does not work?
when it facing obstacles it start turning around speedly donot stop ,and bluetooth command not accepted properly .. i want the car recived command smoothly and when it face obstacle it just once turning left or right but it does not recived command smoothly ,help me sir
The code makes the robot turn around with full speed when it is less than 10cm from the obstacle, so maybe you can reduce its turning speed by changing the "motor1.setSpeed(255);" code to something like "motor1.setSpeed(150);" or increase the "minimumDistance" value to let say 30cm and finally make sure the obstacle doesn't block the ultrasonic sensor anymore when the robot turns around.
sir I put connection properly to arduino,l298n,and hc05 Bluetooth modules ,and code to uploading to arduino uno and connection all equipment properly but my robot does not run ( no started). what can do sir please help me please........
Are you sure the TX pin of HC05 is connected to the RX pin of the Arduino board?
can l298n and a common arduino can have 12 volt supply
Empire GAMING clash of clans-clash royale Yes you can. But make sure you connect the 12V supply to the pin VIN of the Arduino, not the pin 5V otherwise it may damage your Arduino board.
What link did i need to use for the parts?
Hi, I did not provide specific link for the parts as they are open and flexible ones. All you need is just a robot chassis with the motors, a battery, a motor driver, an Arduino board and a Bluetooth module, no matter what brand they are. However to get the best result, try to use the the same brand of motor driver that I use in the video, which is the DFRobot's one.
Thanks so much sir ,I found my error and I successfully compiling. thanks so much.
You are welcome :)
how to connect BT module in it
BT module should be connected to RX pin of the Arduino board
what is the model of motor driver shield......plz bro tell me.. i m not an engineer
Hi, the motor driver used is dual channel DC motor driver by DFRobot. You can get more description about the product at this link: goo.gl/Vrf3oO. If you want to buy it online, you may click this link goo.gl/fybnbr. The product is made by other manufacturer but trust me, it is a good high quality one.
+Nudge Me brother can i use L298N Motor Driver for this
+Provakor Konik Yes of course you can. Even L293 will do but it is better to use the L298 as it can handle higher ampere which normally occurs when the motor is stalled
so the coding would be same or it would be different
95% of the the code remains the same except for the pin declaration which should be following the motor driver's pin connection
could i use ch 05 bluetooth?
Yes. Any kind of BT modules will do, for example the HC-05 or the Bluetooth Bee
thanks!
can i use ESP8266 wifi module instead of bluetooth module...here?
Niyon Rezwan This app communicates through BT connection only, not the wifi. So, you cannot use this app to control the robot via wifi communication.
Nudge Me oh..ok thnx
Niyon Rezwan You are welcome :)
where u bought it
Hi, you can buy it from AliExpress, eBay or most of local online electronic stores around you
which bo motor u used
Hi, I just used the default BO motors that came with the robot chassis set. You can use any BO motors you like, as long as they suit your project requirement
what do you mean to add this? HC-SR04 ultrasonic sensor ? thanks
It means that beside controlling the car using joystick, you can also make the car response to the surrounding obstacles by mounting ultrasonic sensor on it.
Nudge Me ok thanks bro
hello sir,, what are the difference between motor drive shield (L298N and L293d) ?
sudip thapa Hi, the maximum output current for L293D per cahnnel is 1A while for L298N is 2A.
so im making 6 wheels stair climbing rocker bogie rover so which one is better ?? and which is better in between (HC-06 and HC-05) ? please i need your suggestion
sudip thapa The higher output current it supports, the better. So you can choose the L298N for that purpose (considering your motors are not consuming power more than it can stand support).
HC05 and HC06 functions just the same between each other, and the only major difference is HC05 can act as either master or slave while HC06 can act only as slave. Means if you want to connect between two Bluetooth modules, you need to use at least ome HC05 to be the master and the other one can be either HC05 or HC06. If you want to connect the Bluetooth module to the PC or phone as in this video, then HC06 will do.
Nudge Me thank you so much .. it means alot to me :-) and can I use any one from (HC-05 & HC-06) Bluetooth transceiver ??
sudip thapa Yes, you can :)
sir can I build at a time ultrasonic sensor as well as Bluetooth robot car , can it possible .if possible HOW ?
Yes, it is possible to attach the ultrasonic sensor to the robot. Modify the code so that the robot does something when the sensor detects the object or obstacles.
hey dude can i use hc 05 . will the code be same??
kasim t Hi, the code stays the same either for HC05 or the HC06 BT module.
no sir I can connected only 12 v pin in battery positive and gnd to negative terminal to battery( gnd to arduino) and 5v pin to arduino. and I confused that your give code x= Serial.parselnt(); and I use x="Serial.parselnt()";which one correct (firstly I use your code same place so showing error me) that place only modifly please replay me
what is rpm of your motors
Hi, the motors came together as one set and I have no info of their rpm. However according to the technical description of similar motors that were used, the speed is about 200 rpm at 6V. You can get the info at this link: goo.gl/IbD9IH
can you pls help me how can I use arduino motor shield instead of dual channel motor shield
Can you show me which motor shield are you going to use? Because so far almost all Arduino motor shield is dual channel, not single.
i want to use Lipo 11,1v 3S battery, is it ok?
and i don't understand about your variable like ML,MR,EL,ER and btna, and many more. would you explain to me bro. hehehe thanks
ramagandi adhika Hi, high power battery for this kind of motors is not recommended as it may affect the lifespan of the motors.
ML represents Motor Left's direction control and MR is for the right's one. ER on the other hand is for Enable Right or motor right's speed control (using pwm) and EL is for the left's pwm. You can use any variables name you like as long as they work correctly.
You may refer to this commented code to help you out understanding the code and most of the variables used:
goo.gl/plPNYt
i use your code and your recommend component and app. my robot can't turn right. turn left,forward, backward is ok, but not for turn right. what should i do?
sir another error show me ( 'erp' was not declared in this scope) please help me Sir.
Strange. I have tested the code for several times.. Did you use the given code directly or you use copy and paste function?
bro can u tell me which motor shield are u using
suman gupta Hi, I used this:
www.dfrobot.com/product-69.html
there is light on motor driver , arduino , bluetooth module
how if add recognition camera? it can ?
Shaker Abu Shukor Yes. Watch this video: ua-cam.com/video/G78WBb5mOls/v-deo.html
i mean camera face recongnition it can ?
You can add any camera you like, but the question is either the camera is used to control the robot motion or not..
Camera Web , with wifi robot car , just to know people face
Shaker Abu Shukor Yes of course you can
If i want to use l293d motor shield with arduino mega. What coding we want to edit?
Hi, if you use the Adafruit L293D motor shield, then you don't have to change anything in the given code (goo.gl/YWJYfW). Just don't forget to select Arduino Mega board in the Tools menu.
yes thats right this webside... yes to sharing information
sir can I use this code for l298n and same joystick app control( showing video phone app ) .
Hi, the code at goo.gl/B5DHym is already modified to be used with L298N type of motor driver. The circuit diagram is at goo.gl/UhbCxl.
i want to use wifi module instead of bluetooth module, can you help me in my project
Yatender Sindhu Hi, the app itself doesn't support connection through wifi, so if you want to build that kind of project, you may need to use wifi shield or Nodemcu board.
so what about the code
the thing is that i am new to all this stuff and i chose this as my Integrated Project and i really want your help.
i have to make this same car controlled via wifi and keep a spy camera that too controlled by wifi
and i wanted to know how much it would cost me to make this project with wifi controlled
el que lleva el HC-SR04 Sensor ultrasónico , también lleva el serio SG90??