Problem uploading

Hi,

I have some troubles uploading my sketch to the board and I would like to know what is wrong.

I don't have RX and TX connected.

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x26
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x26
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x26
Problema subiendo a la placa. Visita http://www.arduino.cc/en/Guide/Troubleshooting#upload para sugerencias.
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x26
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x26
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x26
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x26
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x26
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x26
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x26

Hi,
What model arduino do you have.
What do you mean by "I don't have RX and TX connected."

Please explain your setup.

Can you please post a copy of your sketch, using code tags?
They are made with the </> icon in the reply Menu.
See section 7 http://forum.arduino.cc/index.php/topic,148850.0.html

Tom..... :slight_smile:

Hi

Maybe you can try to use an other USB-cable if it's an Arduino which needs an USB-cable.
I have also had such an problem and it worked with an other cable.

Daniel

Daniel-S:
Maybe you can try to use an other USB-cable if it's an Arduino which needs an USB-cable.

Maybe we really need to know what he is actually doing, since we basically have no details at all.

I'm building a 2 wheel car controlled by bluetooth

This is the code im trying to upload.

/*
 * Control 2 DC motors with Smartphone via bluetooth
 */
int motor1Pin1 = 3; // pin 2 on L293D IC
int motor1Pin2 = 4; // pin 7 on L293D IC
int enable1Pin = 6; // pin 1 on L293D IC
int motor2Pin1 = 8; // pin 10 on L293D IC
int motor2Pin2 = 9; // pin 15 on L293D IC
int enable2Pin = 11; // pin 9 on L293D IC
int state;
int flag=0;        
int stateStop=0;
void setup() {
    // sets the pins as outputs:
    pinMode(motor1Pin1, OUTPUT);
    pinMode(motor1Pin2, OUTPUT);
    pinMode(enable1Pin, OUTPUT);
    pinMode(motor2Pin1, OUTPUT);
    pinMode(motor2Pin2, OUTPUT);
    pinMode(enable2Pin, OUTPUT);
    
    digitalWrite(enable1Pin, HIGH);
    digitalWrite(enable2Pin, HIGH);
    
    Serial.begin(9600);
}

void loop() {
    
    if(Serial.available() > 0){     
      state = Serial.read();   
      flag=0;
    }   
   
    if (state == '1') {
        digitalWrite(motor1Pin1, HIGH);
        digitalWrite(motor1Pin2, LOW); 
        digitalWrite(motor2Pin1, LOW);
        digitalWrite(motor2Pin2, HIGH);
        if(flag == 0){
          Serial.println("Go Forward!");
          flag=1;
        }
    }
    
  
    else if (state == '2') {
        digitalWrite(motor1Pin1, HIGH); 
        digitalWrite(motor1Pin2, LOW); 
        digitalWrite(motor2Pin1, LOW);
        digitalWrite(motor2Pin2, LOW);
        if(flag == 0){
          Serial.println("Turn LEFT");
          flag=1;
        }
        delay(1500);
        state=3;
        stateStop=1;
    }
  
    else if (state == '3' || stateStop == 1) {
        digitalWrite(motor1Pin1, LOW); 
        digitalWrite(motor1Pin2, LOW); 
        digitalWrite(motor2Pin1, LOW);
        digitalWrite(motor2Pin2, LOW);
        if(flag == 0){
          Serial.println("STOP!");
          flag=1;
        }
        stateStop=0;
    }

    else if (state == '4') {
        digitalWrite(motor1Pin1, LOW); 
        digitalWrite(motor1Pin2, LOW); 
        digitalWrite(motor2Pin1, LOW);
        digitalWrite(motor2Pin2, HIGH);
        if(flag == 0){
          Serial.println("Turn RIGHT");
          flag=1;
        }
        delay(1500);
        state=3;
        stateStop=1;
    }

    else if (state == '5') {
        digitalWrite(motor1Pin1, LOW); 
        digitalWrite(motor1Pin2, HIGH);
        digitalWrite(motor2Pin1, HIGH);
        digitalWrite(motor2Pin2, LOW);
        if(flag == 0){
          Serial.println("Reverse!");
          flag=1;
        }
    }

}

Hi,
What model arduino do you have.
What do you mean by "I don't have RX and TX connected."

Please explain your setup, possibly a picture.

Tom........ :slight_smile:

Im using an Arduino UNO

And basically my problem is that once I connect my board to the PC the board's LED shows up and after a few seconds it fades.

I am using a hy-05 bluetooth and I don't have connected RT and TX on the board when I am trying to upload my sketch.

Also, I am using 2 6V DC motors.

I attach my setup

Hi,
Which LED is that?
If its the power LED then you have a problem, what are you using to power the arduino.
Also do not use the 5V pin on the UNO to power the motors.
Have you got jumpers to connect the other two power rails down the side you are powering the blutooth with.

Try doing an download with the motors disconnected.
I notice you have gnd connected to the red line and 5V to the blue, I hope you haven't got the driver connected to the wrong rails.
The usual standard is positive RED and gnd BLUE.

Do, you have a DMM to measure some voltages?

Tom.... :slight_smile:

I swapped both 5V and GND pins and now the board's LED works correctly, also bluetooth LED shows up.

I tried to upload the sketch but I still have the same error (programmer is not responding)

Furthermore, I would like to know how I should power the motors without using 5V pin. If you could attach a photo to check how it should be done I would appreciate it.

Hi,

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

The diagram you have supplied is not a schematic.

Post a schematic of how you have it setup and well can then let you know how to add the extra power source.

Tom..... :slight_smile:
Just try and load the Blink example sketch.

wasabin:
Furthermore, I would like to know how I should power the motors without using 5V pin.

You need a 5V (regulated) power supply.

It needs to be rated to power the motors.