使用Arduino Uno,获取错误消息,似乎是一个语法错误...... ???
还有几种其他草稿,在一个我能够阅读我的串行监视器“1”,仍然加速度计,“11”用于移动加速度计
在另一个中,我能够阅读仍然加速计,而“1”用于移动加速度计
此选草稿不会成功编译
我希望它在串行监视器上以0开始,每次加速度计都会在3轴中的任何一个上移动
帮助受到赞赏,对我很容易,我是一个初学者
这是我的代码 - 错误消息:预期'x'之前')'
主持人注意:使用的代码标签
还有几种其他草稿,在一个我能够阅读我的串行监视器“1”,仍然加速度计,“11”用于移动加速度计
在另一个中,我能够阅读仍然加速计,而“1”用于移动加速度计
此选草稿不会成功编译
我希望它在串行监视器上以0开始,每次加速度计都会在3轴中的任何一个上移动
帮助受到赞赏,对我很容易,我是一个初学者
这是我的代码 - 错误消息:预期'x'之前')'
C:
const int xpin = a0;Const int Ypin = A1;Const int Zpin = A2;int步骤= 0;int x = 1;void setup(){pinmode(xpin,输入);Pinmode(Ypin,输入);Pinmode(Zpin,输入);Serial.Begin(9600);void循环(){int a = angogread(xpin); delay (500); int b = analogRead (ypin); delay (500); int c = analogRead (zpin); delay (500); if (a < 678) { Serial.print (Steps ++x); } if (b <= 464 ) { Serial.print (Steps ++x); } if (c <=4 ) { Serial.print (Steps ++x); } if (a >= 680) { Serial.print (Steps ++x); } if (b >= 674) { Serial.print (Steps ++x); } if (c > 6) { Serial.print (Steps ++x); } }
上次编辑: