Problem beim Hochladen von Programmen

Hallo,
seit kurzem habe ich das Problem das ich nichts mehr auf mein Arduino nano Board hochgeladen bekomme.
Immer wenn ich dies probiere taucht die folgende Fehlermeldung auf:
Arduino: 1.8.1 (Windows 10), Board: "Arduino Nano, ATmega328"

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x62
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x62
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x62
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x62
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x62
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x62
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x62
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x62
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x62
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x62

Kennt jemand das Problem und weiß was ich tun kann um den Fehler zu beheben?

Grüße Zemizz

Falsche Serielle Schnittstelle ausgewählt oder gar kein Arduino Nano oder USB Kabel eingesteckt?

Das würde genau deinen Fehler verursachen...

Danke für die schnelle Antwort.

Der Arduino Nano ist auf jeden Fall richtig verbunden, über den Seriellen Monitor erscheint auch das Board an dem richtigen COM Port. Außerdem leuchtet die Power Led.

Grüße Zemizz

Hast du an D0 und D1 etwas angeschlossen ?

Ja, die beiden Pins nutze ich zum kommunizieren mit einem anderen Nano.

Grüße Zemizz

Zemizz:
Ja, die beiden Pins nutze ich zum kommunizieren mit einem anderen Nano.

Grüße Zemizz

Entfernen und neu versuchen

Zemizz:
Ja, die beiden Pins nutze ich zum kommunizieren mit einem anderen Nano.

Die Serielle ist kein Bussystem!
2 Partner, mehr sind nicht erlaubt.

Ich habe die Kabel an den Pins abgenommen und nun funktioniert es wieder.

Danke für die Hilfe.

Grüße Zemizz

Zemizz:
Ich habe die Kabel an den Pins abgenommen und nun funktioniert es wieder.

Danke für die Hilfe.

Grüße Zemizz

Na prima, gerne doch.
Manchmal kann es so einfach sein. :wink:

Die Pins D0 und D1 werden auch vom USB-Adapter auf dem Nano verwendet und dürfen während des Uploads nicht beschaltet sein.

Hallo,
seit kurzem habe ich das Problem mit dem selben Arduino wieder, doch habe ich alle schon genannten Fehlerquellen überprüft und ausschließen können.
Gibt es vielleicht noch eine Möglichkeit weshalb ich nicht auf das Board uploaden kann?

Grüße Zemizz

Welche Fehlermeldung bekommst du ?

genau die gleiche wie oben:

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x62
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x62
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x62
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x62
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x62
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x62
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x62
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x62
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x62
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x62

Was ist aktuell auf dem Nano drauf ?

Ist es der Sketch, der über D0 und D1 kommunizieren soll ?

Der Sketch kommuniziert nicht über D1 und D0

 #include <SPI.h>
  #include <PN532_SPI.h>
  #include "PN532.h"
  #include <Servo.h>

  PN532_SPI pn532spi(SPI, 10);
  PN532 nfc(pn532spi);
    unsigned long Fahrzeug_UID = 4294960315;
unsigned long Fahrzeug_UID2 = 4294951346;
unsigned long Fahrzeug_UID3 = 0;
unsigned long Fahrzeug_UID4 = 0;
char Uidtop;
 

long long int interval1 = 0 ;
long long int interval2 = 0 ;
long long int interval3 = 0 ;
long long int interval4 = 0 ;
long long int interval5 = 0 ;
long long int interval6 = 0 ;
char incomingByte;
long long int startzeit2 = 0 ;
int busvorhanden = 0 ;
Servo servo_pin_3;
long long int startzeit3 = 0 ;
int zufall = 0 ;
long long int startzeit1 = 0 ;
Servo servo_pin_2;
long long int startzeit4 = 0 ;
int Einsatzzufall = 0 ;
long long int startzeit5 = 0 ;
int Feuerwehrweiche = 0 ;
//Servo servo_pin_4;
long long int startzeit6 = 0 ;

void Kreuzung();
void Bus();
//void Feuerwehreinsatz();

void setup(void) {
 // Serial.begin(115200);
//  Serial.println("Hello!");
 servo_pin_3.attach(3);
  randomSeed(analogRead(A0) + analogRead(A1) + analogRead(A2));
  servo_pin_2.attach(2);
//  servo_pin_4.attach(4);
   interval1 = 2000 ;

  interval2 = 20 ;

  interval3 = 3000 ;

  interval4 = 6000 ;

  interval5 = 20 ;

  interval6 = 2000 ;

  nfc.begin();

  uint32_t versiondata = nfc.getFirmwareVersion();
  if (! versiondata) {
  // Serial.println("Didn't find PN53x board");
    while (1); // halt
  }
  // Got ok data, print it out!
  //Serial.print("Found chip PN5"); Serial.println((versiondata>>24) & 0xFF, HEX); 
 // Serial.print("Firmware ver. "); Serial.print((versiondata>>16) & 0xFF, DEC); 
 // Serial.print('.'); Serial.println((versiondata>>8) & 0xFF, DEC);
  
//   configure board to read RFID tags
  nfc.SAMConfig();
  
 // Serial.println("Waiting for an ISO14443A Card ...");
}


void loop(void) {
  uint8_t success;
  uint8_t uid[] = { 0, 0, 0, 0, 0, 0, 0 };  // Buffer to store the returned UID
  uint8_t uidLength;                        // Length of the UID (4 or 7 bytes depending on ISO14443A card type)
    
  // Wait for an ISO14443A type cards (Mifare, etc.).  When one is found
  // 'uid' will be populated with the UID, and uidLength will indicate
  // if the uid is 4 bytes (Mifare Classic) or 7 bytes (Mifare Ultralight)
  success = nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A, uid, &uidLength);
// Serial.println("Incoming Byte: "+incomingByte); 
  if (success) {
    // Display some basic information about the card
 //  Serial.println("Found an ISO14443A card");
 //   Serial.print("  UID Length: ");Serial.print(uidLength, DEC);Serial.println(" bytes");
 //   Serial.print("  UID Value: ");
   //nfc.PrintHex(uid, uidLength);
  //  Serial.println("");       
               unsigned long UID_unsigned;
  UID_unsigned =  uid[0] << 24;
  UID_unsigned += uid[1] << 16;
  UID_unsigned += uid[2] <<  8;
  UID_unsigned += uid[3];
 // Serial.println("UID Unsigned int"); 
// Serial.println(UID_unsigned);
    if ((UID_unsigned)==(Fahrzeug_UID)){
          Uidtop='A';
        //  Serial.println("A received top");
         
        }
        if ((UID_unsigned)==(Fahrzeug_UID2)){
          Uidtop='B';   
        //  Serial.println("B received top");
        }
        if ((UID_unsigned)==(Fahrzeug_UID3)){
          Uidtop='C';
        //  Serial.println("C received top");
        }
        if ((UID_unsigned)==(Fahrzeug_UID4)){
          Uidtop='D';
        //  Serial.println("D received top");
          
        }

        }
     //  Serial.println("received Uid top" + Uidtop);
/*if ( Serial.available() > 0)
  {
    incomingByte = Serial.read();
 
  }
   Feuerwehreinsatz();*/
   Kreuzung();
   Bus();
}

void Kreuzung()
{
  zufall =   random( 6 ) ;
  if (( ( ( millis() - startzeit1 ) ) >= ( interval1 ) ))
  {
    startzeit1 = millis() ;
    if (( ( zufall ) <= ( 2 ) ))
    {
      servo_pin_2.write( 112 );
    }
    else
    {
      servo_pin_2.write( 86 );
    }
  }
  
}
/*void Feuerwehreinsatz()
{
if (( ( ( millis() - startzeit4 ) ) >= ( interval4 ) ))
  {
    startzeit4 = millis() ;
    Einsatzzufall =   random( 4 ) ;
  }
  if (( ( ( millis() - startzeit5 ) ) >= ( interval5 ) ))
  {
    startzeit5 = millis() ;
    if ( ( ( Einsatzzufall ) == ( 1 ) ) )
    {
     if (( ( ( incomingByte ) == ( 'C' ) ) || ( ( incomingByte ) == ( 'B' ) ) ))
  {
    servo_pin_4.write( 110 );
    
  }
  else
  {
    servo_pin_4.write( 90 );
  }
    }
    else{
       servo_pin_4.write( 90 );
    }
  }
 
  
  
}*/
void Bus()
{
  if (( ( ( millis() - startzeit2 ) ) >= ( interval2 ) ))
  {
    startzeit2 = millis() ;
    if (( ( ( 'A' ) == ( Uidtop ) ) || ( ( 'D' ) == ( Uidtop ) ) ))
    {
        if (( ( 'A' ) == ( Uidtop ) ))
    {
      servo_pin_3.write( 55 );
    }
    else
    {
      servo_pin_3.write( 70 );
    }
    }
    else
    {
      servo_pin_3.write( 95 );
    }
  }
 
  
}

Und das richtige Board hast du auch gewählt ?

Ja

Zemizz:
Ja

Wenn du schon alles probiert hast, bleibt nur den PC oder Nano tauschen.

Hallo,

schalte mal bitte vom Compiler ALLE Warnungen ein.
Datei > Voreinstellungen > Compiler-Warnungen: ALLE
Zudem fällt mir was anderes im Code auf. Entweder long oder int. Nicht beides.

long long int interval1 = 0 ;

Den Blink Sketch aufspielen funktioniert auch nicht?

Mir scheint das der zusammengewürfelte Code irgendwas unkontrolliertes macht.
Ich weiß nicht ob es nicht irgendwelche Tricks gab den Arduino sauber im Reset zuhalten für ein neues flashen?

Das sollte schon gehen.
long int ist definitiv erlaubt und das gleiche wie long. long long soll vermutlich int64_t sein. Ist jedenfalls auch erlaubt.

Seit wann sind 64 Bit möglich?