for 发表于 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. .
    //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"
在 文件>首选项 中启用
错误信息

Super169 发表于 2014-4-26 22:12:41

ET 及 mydata 在程式中沒有定義, 自然要出 error 了.

林定祥 发表于 2014-4-26 22:28:34

两个变量用之前要先定义。
页: [1]
查看完整版本: 编译时报错误