KY-022 Infrared Receiver Module - ArduinoModulesInfo

PHOTO EMBED

Mon Nov 20 2023 14:10:54 GMT+0000 (Coordinated Universal Time)

Saved by @kathigitis.plhr #arduino

#include <IRremote.h>
int RECV_PIN = 11; // define input pin on Arduino 
IRrecv irrecv(RECV_PIN); 
decode_results results; // decode_results class is defined in IRremote.h
void setup() { 
	Serial.begin(9600); 
	irrecv.enableIRIn(); // Start the receiver 
} 
void loop() { 
	if (irrecv.decode(&results)) {
		Serial.println(results.value, HEX); 
		irrecv.resume(); // Receive the next value 
	}
	delay (100); // small delay to prevent reading errors
}
content_copyCOPY

https://arduinomodules.info/ky-022-infrared-receiver-module/