上传到nano时如何修复Avrdude错误

发布于 2025-02-04 19:09:13 字数 652 浏览 2 评论 0原文

我有一个错误:

avrdude:stk500_recv():程序员没有响应

stk500_getsync()尝试1:of 10:不同步:resp = 0x00

avrdude:stk500_recv()

avrdude: 10:不同步:resp = 0x00

当我将此代码上传到我的纳米时:

#include <Servo.h>

Servo myservo;  
int potpin = A0;
int val;   

void setup() {
  myservo.attach(9); 
} 

void loop() {
  val = analogRead(potpin);        
  val = map(val, 0, 1023, 0, 180);    
  myservo.write(val);                  
delay(15);                          
}

Arduino帮助中心说我可能选择了错误的板和端口。因此,我重新选择了纳米板并放入COM3。我还重新安装了CH340驱动程序,因为我的Arduino是克隆。我已经尝试重新上传和重新启动,但似乎没有任何作用,我会遇到同样的错误。有人知道如何解决这个问题吗?

任何帮助都非常感谢。

I get this error:

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

When I upload this code to my Nano:

#include <Servo.h>

Servo myservo;  
int potpin = A0;
int val;   

void setup() {
  myservo.attach(9); 
} 

void loop() {
  val = analogRead(potpin);        
  val = map(val, 0, 1023, 0, 180);    
  myservo.write(val);                  
delay(15);                          
}

The Arduino help center says I might have selected the wrong board and port. So I reselected the Nano board and put in COM3. I also reinstalled the CH340 driver as my Arduino is a clone. I’ve tried reuploading and restarting but nothing seems to work and I get the same error. Anyone know how to fix this?

Any help is much appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文