你们中的某个人可以帮我解决代码问题?我得到了通用的编译错误: 错误:预期前主表达式“{”令牌错误:在'{'令牌之前预期的初级表达式
与代码这部分代码:
for (int i=0; i<2; i++) {
PotValue[i] = analogRead(PotPin[i]); //This is the error line
MappedPotValue[i]=(PotValue[i]+1)/103;
//SomeCode Here
}
所以。我的目标是在PotValue阵列写在Arduino板所有花盆的所有值
PotValue和MappedPotValue是
而且PotPin已被宣布为2 lenght的INT数组:
#define PotPin {A0, A1} // These are two analog pins on arduino board
的对循环是一个定时器中断
THX内寻求帮助
'analogRead'采取了什么参数? – 0x499602D2