私はCプログラミングが初めてで、IR HEX文字列を比較しようとしています。エラーが発生しています: 代入の左オペランドとして左辺値が必要です。
私の問題は31行目あたりだと思います。コードは次のとおりです。
/* IRremote: IRrecvDemo - demonstrates receiving IR codes with IRrecv
* An IR detector/demodulator must be connected to the input RECV_PIN.
* Version 0.1 July, 2009
* Copyright 2009 Ken Shirriff
* http://arcfn.com
*/
#include <IRremote.h>
int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
decode_results results;
String stringAppleUp;
void setup()
{
Serial.begin(9600);
irrecv.enableIRIn(); // Start the receiver
}
void loop() {
if (irrecv.decode(&results)) {
Serial.println(results.value, HEX);
Serial.println ("See it");
stringAppleUp = string('77E150BC'); //apple remote up button
if ( ???? = stringAppleUp) {
Serial.println("yes");
}
else
{
Serial.println("No");
}
irrecv.resume(); // Receive the next value
}
}
行: if (??? = stringAppleUp) ??? のどこにどの変数を入れるかわかりません は。
助けてくれてありがとう。意思