Go Down

Topic: Can't upload on UNO (Read 294 times) previous topic - next topic

sonibla

Hi! :)
I'm on Linux Ubuntu 16.04 and Arduino IDE 2:1.0.5.
I can't anymore upload programs on my Arduino UNO (it worked very well before).

The last program I have uploaded still works, except the "Serial.print" command : the TX led is on but I can't get data in the serial monitor... :(
Here is the program still running on Arduino:
Code: [Select]

void setup() {
  pinMode(9,OUTPUT);
  pinMode(10,OUTPUT);
  pinMode(11,OUTPUT);

  Serial.begin(9600);
}
unsigned int ivalue = 0;
unsigned int pin = 0;
boolean on = 1;
int value = 15;
unsigned previousTime = 0;

void loop() {
  unsigned long currentTime = millis();
  float dela = 625.0 * (1.0 / value);
  if(currentTime - previousTime > dela) {
    previousTime = currentTime;
    if (pin == 9) {
      if ((ivalue == value and on == 1) or (ivalue == 0 and on == 0)) {
        pin++;
        on = not(on);
      }
      else {
        if(on) {
          ivalue++;
        }
        else {
          ivalue--;
        }
        analogWrite(pin, ivalue);
        Serial.print("pin:");
        Serial.print(pin);
        Serial.print("  value:");
        Serial.println(ivalue);
      }
    }
    else if(pin == 10) {     
      if ((ivalue == value and on == 1) or (ivalue == 0 and on == 0)) {
        pin++;
        on = not(on);
      }
      else {
        if(on) {
          ivalue++;
        }
        else {
          ivalue--;
        }
        analogWrite(pin, ivalue);     
        Serial.print("pin:");
        Serial.print(pin);
        Serial.print("  value:");
        Serial.println(ivalue); 
      }
    }
    else if(pin == 11) {     
      if ((ivalue == value and on == 1) or (ivalue == 0 and on == 0)) {
        pin = 9;
        on = not(on);
      }
      else {
        if(on) {
          ivalue++;
        }
        else {
          ivalue--;
        }
        analogWrite(pin, ivalue);
        Serial.print("pin:");
        Serial.print(pin);
        Serial.print("  value:");
        Serial.println(ivalue);       
      }
    }
    else {
      pin = 9;
    }
  }
}


When I try to upload, the board resets (the L led blinks, the program stops...) but the upload fails. (I even tried to remove every wire of my circuit when uploading, but not the first time I got the error)

Here is the error displayed :
Code: [Select]
Taille binaire du croquis : 444 octets (d'un max de 32 256 octets)
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00


Thanks for your help  ;)

sonibla

Re
I resolved my problem !
The port didn't work, so i only had to use another USB port of my computer :D

Go Up