极客工坊

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 12178|回复: 4

求救啊....弄了几个小时了...

[复制链接]
发表于 2015-7-3 13:10:12 | 显示全部楼层 |阅读模式
Arduino:1.6.5 (Windows 7), 板:"Arduino Uno"

构建选项已变更,全部重新构建

launch:13: error: stray '\' in program
launch:13: error: stray '\' in program
launch:13: error: exponent has no digits
launch.ino: In function 'void loop()':
launch:13: error: 'u3000' was not declared in this scope
launch:13: error: expected ';' before 'u3000irsend'
stray '\' in program

  报告将会包含更多的信息
  "在编译时,输出详细信息"
  在 文件>首选项 中启用

代码:
#include <IRremote.h>   
const int buttonPin = 7;                 
int buttonState = 0;                    
IRsend irsend;                           
void setup()
{
  pinMode(buttonPin, INPUT);            
}
void loop()
{
  buttonState = digitalRead(buttonPin);
  if(buttonState == LOW) {   
  irsend.sendNEC(125EC009,32);   
  }
}
回复

使用道具 举报

发表于 2015-7-3 13:51:34 | 显示全部楼层
可能有中文的"空白"在loop() 裡, 重新打過~ 不要copy/paste
回复 支持 反对

使用道具 举报

发表于 2015-7-3 13:52:33 | 显示全部楼层
expected ';' before 'u3000irsend'
==>"irsend.sendNEC(125EC009,32);   "這一行及前一行檢查看看
回复 支持 反对

使用道具 举报

 楼主| 发表于 2015-7-4 09:27:03 | 显示全部楼层
alai2015 发表于 2015-7-3 13:51
可能有中文的"空白"在loop() 裡, 重新打過~ 不要copy/paste

我看看,谢谢
回复 支持 反对

使用道具 举报

发表于 2015-7-5 07:23:49 | 显示全部楼层
irsend.sendNEC(125EC009,32);
16进制数不需要加0x吗
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|联系我们|极客工坊

GMT+8, 2026-6-17 01:46 , Processed in 0.033172 second(s), 20 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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