Arduino IDE : NodeMCU ESP8266 Lolin V3 IR Receiver.
This is simple connection of NodeMCU ESP8266 Lolin V3 with IR Receiver.
______________
Arduino Code for getting IR Remote Values from it's buttons.
#include <Arduino.h>
#include <IRremoteESP8266.h>
#include <IRrecv.h>
#include <IRutils.h>
const uint16_t kRecvPin = 14;
IRrecv irrecv(kRecvPin);
decode_results results;
void setup() {
Serial.begin(115200);
irrecv.enableIRIn(); // Start the receiver
while (!Serial) // Wait for the serial connection to be establised.
delay(50);
Serial.println();
Serial.print("IRrecvDemo is now running and waiting for IR message on Pin ");
Serial.println(kRecvPin);
}
void loop() {
if (irrecv.decode(&results)) {
// print() & println() can't handle printing long longs. (uint64_t)
serialPrintUint64(results.value, HEX);
Serial.println("");
irrecv.resume(); // Receive the next value
}
delay(100);
0 Comments