Louie NRT Story

[Arduino] IR Receive 본문

에너지

[Arduino] IR Receive

hyeok0724.kim@gmail.com 2019. 12. 14. 15:43
반응형

Writed: 14 DEC 2019

1. Install Library

 

 

2. Upload that Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <IRremote.h>
 
int RECV_PIN = 11;
 
IRrecv irrecv(RECV_PIN);
 
decode_results results;
 
void setup()
{
  Serial.begin(9600);
  // In case the interrupt driver crashes on setup, give a clue
  // to the user what's going on.
  Serial.println("Enabling IRin");
  irrecv.enableIRIn(); // Start the receiver
  Serial.println("Enabled IRin");
}
 
void loop() {
  if (irrecv.decode(&results)) {
    Serial.println(results.value, HEX);
    irrecv.resume(); // Receive the next value
  }
  delay(100);
}
 

 

3. Circuit Diagram

4. Print Remote Controller Packet

 

Button 1: FFA25D

Button 2: FF629D

Button 3: FFE21D

Button 4: FF22DD

Button 5: FF02FD

Button 6: FFC23D

Button 7: FFE01F

Button 8: FFA857

Button 9: FF906F

Button 0: FF9867

Button *: FF6897

Button #: FFB04F

Button UP: FF18E7

Button DOWN: FF4AB5

Button LEFT: FF10EF

Button RIGHT: FF5AA5

Button OK: FF38C7

 

Reference

- https://openmaker.tistory.com/48

반응형

'에너지' 카테고리의 다른 글

[NodeMCU ESP 8266] DHT11  (0) 2019.12.16
[NodeMCU ESP 8266] Board (SZH-WFBB-017)  (0) 2019.12.14
[Raspberry Pi] shell script  (0) 2019.12.09
[나인와트] ECC Setting Report  (0) 2019.12.06
[Hacking] OLLYDbg: Reverse Engineering Tool  (0) 2019.11.15
Comments