itsthedanyole:
I was on the rite track, just having trouble getting arduino to recognize the remote code specific to the button I intend to use.
I was thinking something like this,void loop() {
if (irrecv.decode(&results=A90)) { //or 149 or whatever the sony power button is?...
digitalWrite(relay1, HIGH);
irrecv.resume(); // Receive the next value
}
}
Tried a cpl other variations of that and usual error is "A90" not defined.
Your on the right track but need to compare the result as below. Also note the == as it has a different meaning to =
void loop() {
if (irrecv.decode(&results)) {
if (results.value == 149) { //or 149 or whatever the sony power button is?...
digitalWrite(relay1, HIGH);
}
irrecv.resume(); // Receive the next value
}
}