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

Arduino中文社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 6795|回复: 5

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

[复制链接]
发表于 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);
}



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



发表于 2017-10-30 08:27 | 显示全部楼层
你串口Pin是不是接其他东西了?
 楼主| 发表于 2017-10-30 20:29 | 显示全部楼层
Zoologist 发表于 2017-10-30 08:27
你串口Pin是不是接其他东西了?

就是按书上的图接的啊
发表于 2017-10-30 21:06 | 显示全部楼层
下载使用的就是串口,串口不能复用,关闭再下载吧
发表于 2018-4-8 12:11 | 显示全部楼层
我也觉得是端口占用了,关掉串口监视再下载吧
发表于 2018-8-20 05:09 | 显示全部楼层
卸装arduino,并把C:\Users\Administrator\AppData\Local\下的Arduino15文件夹删除,然后重新安装arduinoIDE可以解决
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|Archiver|手机版|Arduino中文社区

GMT+8, 2024-12-1 01:24 , Processed in 0.189299 second(s), 16 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表