Skip to content

Instantly share code, notes, and snippets.

@vasmani
Last active April 16, 2016 05:05
Show Gist options
  • Select an option

  • Save vasmani/69216336392292b9873b89b2d7c2c60a to your computer and use it in GitHub Desktop.

Select an option

Save vasmani/69216336392292b9873b89b2d7c2c60a to your computer and use it in GitHub Desktop.
Arduino IR receiver test
// library from http://z3t0.github.io/Arduino-IRremote/
// IR receiver는 볼록한 곳을 전면으로 하여 왼쪽부터 D11, GND, 5V 연결
// 각종 IR 리모콘의 값을 확인 할 수 있다.
#include <IRremote.h>
#include <IRremoteInt.h>
int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
decode_results results;
void setup() {
Serial.begin(9600);
irrecv.enableIRIn();
}
void loop() {
if(irrecv.decode(&results)){
Serial.println(results.value);
// irrecv.dump(&results);
irrecv.resume();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment