Need help in code for my Arduino-bluetooh car

Hello :slight_smile:
Can somebody help me to write a code for my bluetooth controlled car

I need a code for a servo which is used for steering. And for 2 motors on back wheels for going forward and backwards using app on my mobile phone.

Please if someone can help i would be very grateful! <3

I posted how the elements are conected all together (i hope it is all ok!)

Ty very much!!

Many people have made arduino cars controlled by Bluetooth before. Google "Arduino bluetooth car" and you'll find lots of projects including the code for them.

Steve

lepi11:
Hello :slight_smile:
Can somebody help me to write a code for my bluetooth controlled car

Hi lepi11, welcome to the forum.
We love to help with projects like this.
What have you been able to do so far?

vinceherman:
Hi lepi11, welcome to the forum.
We love to help with projects like this.
What have you been able to do so far?

Hello!
Thank you for replying.. I need someone that could help me writing a working code in arduino for my project. I need to make a code for my car that would be controlled by a phone app (which i also need to make,and if someone knows that too i would really appreciate!), so i thing the easiest is to make 4 buttons: forward,backwards and for servo steering left and right. I don't know how to write all this in an arduino because i am a beginner in this and i need it for my school project.

if someone can help me i would be very thankful, and i don't know how things work in here?.. do i pay for someones help or what?
Thank you!

slipstick:
Many people have made arduino cars controlled by Bluetooth before. Google "Arduino bluetooth car" and you'll find lots of projects including the code for them.

Steve

Hello!

I can't seem to find this one that I need(servo for steering and 2 DC motors one for each wheel in the back)

You need use a little initiative. Try adding "servo steering" to the query i.e. "arduino car bluetooth servo steering". I can see several complete projects on the first page or two. I can't tell if any are EXACTLY what you want because you've given us no details except "DC motors" (there are thousands of different ones) and "servo" (there are loads of those too).

Or if you don't really mean "help" you mean you want someone to just write the whole code for you then try asking in Gigs and Collaborations further down the main page. You'll almost certainly need to pay for it and it may take a while. But that sounds like cheating to me, getting someone else to do your school project for you.

Steve

lepi11:
Hello!
Thank you for replying.. I need someone that could help me writing a working code in arduino for my project. I need to make a code for my car that would be controlled by a phone app (which i also need to make,and if someone knows that too i would really appreciate!), so i thing the easiest is to make 4 buttons: forward,backwards and for servo steering left and right. I don't know how to write all this in an arduino because i am a beginner in this and i need it for my school project.

if someone can help me i would be very thankful, and i don't know how things work in here?.. do i pay for someones help or what?
Thank you!

Huh. I asked what you have been able to do so far and you mostly re-state the original requirement.

Let me be more clear in what I am asking.

What have you been able to do so far?

  • Do you have an arduino?
  • Have you uploaded a simple test sketch like Blink to confirm that you can put sketches on the arduino?
  • Have you purchased the servo?
  • Have you uploaded the Sweep tutorial sketch to confirm that you can make the servo work?
  • Have you purchased the motors and motor drivers?
  • Have you uploaded a sketch to test the motors? (many drivers come with libraries and examples)
  • Have you purchased the blue tooth module?
  • Have you uploaded the test sketch that comes with mose modules to test the bluetooth communication?

Hello, can you help me?
So i put a simple code to test my DC motor and L298 motor drive if evertything works but it doesn't...
So here is the code i tried and i posted a picture of everything connected:

#define in1 3
#define in2 4

Void setup () {
pinMode (in1, OUTPUT) ;
pinMode (in2, OUTPUT) ;

digitalWrite (in1, LOW) ;
digitalWrite (in2, LOW) ;
}

void loop () {

digitalWrite (in1, LOW) ;
digitalWrite (in2, LOW) ;

digitalWrite (in1, HIGH) ;
digitalWrite (in2, LOW) ;
delay (10000)

digitalWrite (in1, LOW) ;
digitalWrite (in2, LOW) ;

digitalWrite (in1, LOW) ;
digitalWrite (in2, HIGH) ;
delay (10000);

}

There's no picture.

The code as you posted it won't even compile. You can't spell void as Void. C++ is case sensitive. And you have a ; missing from one line.

Other than those errors it looks like it may be o.k. It depends exactly what L298 Motor Driver you have. The L298 IC needs an enable signal but that may be sorted out with a jumper on the motor driver board. Does the code do anything at all when you have fixed it?

Also it's important to know what motors you have and how you are powering both the Arduino and the motor driver.

Steve

Here is the picture of everything connected..

slipstick:
There's no picture.

The code as you posted it won't even compile. You can't spell void as Void. C++ is case sensitive. And you have a ; missing from one line.

Other than those errors it looks like it may be o.k. It depends exactly what L298 Motor Driver you have. The L298 IC needs an enable signal but that may be sorted out with a jumper on the motor driver board. Does the code do anything at all when you have fixed it?

Also it's important to know what motors you have and how you are powering both the Arduino and the motor driver.

Steve

Can you explain to me why when i measure with my multimeter 6*1,5 V (9V) batteries i get on multimeter saying 9V BUT when i connect batteries to the motor driver i only get 2.3V.. Where do i lose 4V??????

lepi11:
Where do i lose 4V??????

It's a "feature" of the L298, according to its datasheet:

You lose 1.8V always, and as much as 4.9V if there's substantial current.

Your picture shows a little 9V block battery and they are useless for powering motors.

BTW where exactly are you measuring your 2.3V?

Steve

finola_marsaili:
It's a "feature" of the L298, according to its datasheet:

You lose 1.8V always, and as much as 4.9V if there's substantial current.

So what do I do now?
Do I need 8×1,5 V batteries so it would give me 12V or do i need Something else?

slipstick:
Your picture shows a little 9V block battery and they are useless for powering motors.

BTW where exactly are you measuring your 2.3V?

Steve

So which battery do i need to use for powering 2 dc motors?

Wait i will take picture how i meausure