I am getting this error though the programming is right

I am not sure what this error msg means but its something related to the Bluetooth module i am using. Please help.

Please do not post error messages that way. Do you see the button "Copy error messages"? Click that and then paste into your post between code tags.

Why do you believe this error message is because of a Bluetooth module? How is it connected? Please post a schematic.

The IDE thinks it is talking to a Uno.
What do you think it is talking to?

First thing i see is a problem uploading the program to the board..
A few things to check.. - Is the right board chosen (in Tools>Board..)

  • is the right Port chosen (in Tools>Port)
  • can you get Board Info.

I had similar problems a while ago and solved it by placing a fresh Bootloaded Processor on the board after checking all settings.. After that i bootloaded the (corrupted?) processor again and it works fine since..
Having one or two boards spare can help you out in case of.....

Here is the schematic.

No that is not a schematic it is a useless physical layout diagram.

You'll need to use software serial on the Uno.

Code posted as an image is poo!

Post your code in code tags.

Disconnect the UNO from all that junk and try.

Restart the IDE and try.

Pick a different USB port and try.

Use a different USB cable and try.

Reboot your machine and try.

Until you’ve tried ten things, don’t worry.

I can’t speak for everyone, but I get this problem occasionally - use all the advices up to this point.

It will probably start working again just like it stopped.

HTH

a7

Your bluetooth-module is connected to IO-pins 0 and 1

If you connect the bluetooth-module to the exact same IO-pins that are used for uploading code into the Arduino the bluetooth-module is disturbing the upload process.

If you change to some other IO-pins and use software-serial at a baudrate of maximum 19200 baud. (no higher baudrates as higher baudrates are unreliable on software-serial)

Then you can upload code any time without the need to disconnect the bluetooth module.

best regards Stefan

Hello, I tried using 'software serial' and the initial problem was gone but the upload was stuck and I was not able to connect my HC - 05 Bluetooth-Module.

Did you post that code where you tried software serial so we could take a look at it and see the issue?

What does that mean?

Here are my comments on your diagram:

  1. It is not a schematic
  2. 4XAA batteries is not enough voltage for the regulator on the motor driver module to output 5V
  3. The 5V output from the motor driver module should be connected to the 5V pin on the Uno, not the Vin pin
  4. Connecting the Bluetooth module to pins 0, 1 on the Uno will prevent sketch upload. You need to use software serial on some other pins.
  5. Your Head Light led needs a series resistor, otherwise the Uno pin can be damaged.

Ok, thanks your comments were very helpful but for the last comment I decided to not use the headlight led and I used 'software serial' and there is no error message but it is not uploading completely (The bar) so I am not able to connect to my HC - 05. For your first comment then what power source should I use? Can i use a 9v battery?

Please reply only with the schematic that was requested. Except, have you tried uploading to the board, with no peripheral hardware connected to it?

Edit- sorry one question though... what is powering the Arduino? I see no power connections going to it.

Here it is:

#include <SoftwareSerial.h>
char t;

void setup() {
pinMode(13,OUTPUT); //left motors forward
pinMode(12,OUTPUT); //left motors reverse
pinMode(11,OUTPUT); //right motors forward
pinMode(10,OUTPUT); //right motors reverse

Serial.begin(9600);

}

void loop() {
if(Serial.available()){
t = Serial.read();
Serial.println(t);
}

if(t == '1'){ //move forward(all motors rotate in forward direction)
digitalWrite(13,HIGH);
digitalWrite(11,HIGH);
}

else if(t == '2'){ //move reverse (all motors rotate in reverse direction)
digitalWrite(12,HIGH);
digitalWrite(10,HIGH);
}

else if(t == '4'){ //turn right (left side motors rotate in forward direction, right side motors doesn't rotate)
digitalWrite(11,HIGH);
}

else if(t == '3'){ //turn left (right side motors rotate in forward direction, left side motors doesn't rotate)
digitalWrite(13,HIGH);
}
delay(100);
}

Please edit your post and place it inside code tags, as strongly urged by the forum guidelines.

Hello, I am currently Powering the board with 4 AA batteries but the voltage is not enough so I will have to find a alternative.

That is why I asked you to refrain from posting until you can supply a schematic. Such words don't indicate where you applied the battery power to. Also I've noticed that you don't answer all the questions. Things are not going to progress smoothly unless you pay attention to the questions and answer them all.

ok will do

Great, we really need a complete schematic with all your latest changes... if you really want to speed things up, also post images of your hardware setup.