irremoteesp8266 example

Solutions on MaxInterview for irremoteesp8266 example by the best coders in the world

showing results for - "irremoteesp8266 example"
Lisa
13 Jan 2017
1#include <IRremoteESP8266.h>
2 
3int RECV_PIN = D4; //an IR detector connected to D4
4 
5IRrecv irrecv(RECV_PIN);
6 
7decode_results results;
8 
9void setup()
10{
11  Serial.begin(9600);
12  irrecv.enableIRIn(); // Start the receiver
13}
14 
15void loop() {
16  if (irrecv.decode(&results)) {
17    Serial.println(results.value, HEX);
18    irrecv.resume(); // Receive the next value
19  }
20  delay(100);
21}