#include <IRremote.h>
const byte IR_RECEIVE_PIN = 2;
void setup()
{
Serial.begin(115200);
Serial.println("IR Receive test");
IrReceiver.begin(IR_RECEIVE_PIN, ENABLE_LED_FEEDBACK);
pinMode(13,HIGH);
}
void loop()
{
if (IrReceiver.decode())
{
Serial.println(IrReceiver.decodedIRData.command, HEX);
IrReceiver.resume();
}
}
沒有留言:
張貼留言