最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

My arduino nano does not upload a simple blink code and shows a changing error code whenever I try to upload anything - Stack Ov

programmeradmin3浏览0评论

I just got an ESP32 arduino nano and wanted to test it out by using a modified blink code that prints "ON" and "OFF" into the serial console instead of the LED turning on and off. Here is the code I use:

  Serial.begin(9600);
  Serial.println("Hello world!");
}

// the loop function runs over and over again forever
void loop() {
  Serial.println("On");
  delay(1000);                      
  Serial.println("Off");
  delay(1000);                      
}

Whenever I try to upload it though, it compiles very quickly and then doesn't properly upload the code. Here is what avrdude says the first time:

avrdude: Version 6.3-20190619

         Copyright (c) 2000-2005 Brian Dean, /
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\sonny\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

         Using Port                    : COM3
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x91
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x91
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x91
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x91
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x91
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x91
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x91
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x91
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x91
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x91

avrdude done.  Thank you.

Failed uploading: uploading error: exit status 1

However, whenever it fails it shows a different resp number. This is what avrdude says the second time:

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, /
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\sonny\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

         Using Port                    : COM3
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xad
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xad
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xad
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xad
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xad
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0xad
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xad
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0xad
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xad
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xad

avrdude done.  Thank you.

Failed uploading: uploading error: exit status 1

How should I fix this?

I tried changing the code and researching the errors in hope of finding an answer, and it didn't work because the resp kept on changing every time.

发布评论

评论列表(0)

  1. 暂无评论