:Arduinoのコードのコンパイルエラー:私は私のコードをコンパイルしようとしたとき、私はこのエラーを取得しています「割り当ての左オペランドとして必要な左辺値」
lvalue required as left operand of assignment.
コードは、アナログポートかかわらボタンで読んでいます。エラーが(無効(ループ)に)あるところである:私が持っている一番上に
while (count < 5){
buttonPushed(analogPin) = tmp;
for (j = 0; j < 5; j++) {
while (tmp == 0) { tmp = buttonPushed(analogPin); } //something wrong with the first half of this line!
if(sequence[j] == tmp){
count ++;
}
else {
lcd.setCursor(0, 1); lcd.print("Wrong! Next round:"); delay(1000);
goto breakLoops;
}
}
}
breakLoops:
elapsedTime = millis() - startTime;
:int tmp;
おかげで法的になる場所にあり、次の自分の割り当てコードすることができます。それは完璧に働いたようです。 :-) – user1291351
@ user1291351よろしくお願いします! – ouah