极客工坊

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7648|回复: 2

编译时报错误

[复制链接]
发表于 2014-4-26 21:37:11 | 显示全部楼层 |阅读模式
void loop(){
  //check and see if a data packet has come in.
  if(ET.receiveData()){
    //this is how you access the variables. [name of the group].[variable name]
    //since we have data, we will blink it out.
    for(int i = mydata.blinks; i>0; i--){
      digitalWrite(13, HIGH);
      delay(mydata.pause * 100);
      digitalWrite(13, LOW);
      delay(mydata.pause * 100);
    }
  }

  delay(2500);
}                                  这是代码



Arduino:1.5.6-r2 (Windows XP), 板:"Arduino Uno"

sketch_apr26a.ino: In function 'void loop()':
sketch_apr26a:3: error: 'ET' was not declared in this scope
sketch_apr26a:6: error: 'mydata' was not declared in this scope

  报告将会包含更多的信息
  "Show verbose output during compilation"
  在 文件>首选项 中启用
错误信息
回复

使用道具 举报

发表于 2014-4-26 22:12:41 | 显示全部楼层
ET 及 mydata 在程式中沒有定義, 自然要出 error 了.
回复 支持 反对

使用道具 举报

发表于 2014-4-26 22:28:34 | 显示全部楼层
两个变量用之前要先定义。
回复 支持 反对

使用道具 举报

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

本版积分规则 需要先绑定手机号

Archiver|联系我们|极客工坊

GMT+8, 2024-4-18 15:24 , Processed in 0.055385 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2021, Tencent Cloud.

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