就是打开串口监视器的时候上传总是失败-Arduino中文社区 - Powered by Discuz! Archiver

旺旺99 发表于 2017-10-29 21:56

就是打开串口监视器的时候上传总是失败

Arduino:1.8.3 (Windows 7), 开发板:"Arduino/Genuino Uno"

项目使用了 1932 字节,占用了 (5%) 程序存储空间。最大为 32256 字节。
全局变量使用了188字节,(9%)的动态内存,余留1860字节局部变量。最大为2048字节。
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xd4
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xd4
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xd4
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xd4
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xd4
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0xd4
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xd4
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0xd4
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xd4
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xd4
上传出错。查看http://www.arduino.cc/en/Guide/Troubleshooting#upload 获取建议。

在文件 -> 首选项开启
“编译过程中显示详细输出”选项
这份报告会包含更多信息。



上面是错误信息
下面是程序源码



void setup() {

Serial.begin(9600);
}

void loop()
{
    int sensorValue = analogRead(A0);
    Serial.println(sensorValue);
    delay(1000);
}



什么原因呢?就是一个串口监视器查看光强。



Zoologist 发表于 2017-10-30 08:27

你串口Pin是不是接其他东西了?

旺旺99 发表于 2017-10-30 20:29

Zoologist 发表于 2017-10-30 08:27
你串口Pin是不是接其他东西了?

就是按书上的图接的啊

奈何col 发表于 2017-10-30 21:06

下载使用的就是串口,串口不能复用,关闭再下载吧

BG6QBT 发表于 2018-4-8 12:11

我也觉得是端口占用了,关掉串口监视再下载吧

huangrxu 发表于 2018-8-20 05:09

卸装arduino,并把C:\Users\Administrator\AppData\Local\下的Arduino15文件夹删除,然后重新安装arduinoIDE可以解决
页: [1]
查看完整版本: 就是打开串口监视器的时候上传总是失败