Last active
April 16, 2016 05:05
-
-
Save vasmani/69216336392292b9873b89b2d7c2c60a to your computer and use it in GitHub Desktop.
Arduino IR receiver test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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