Page 12 - S.Shafna (1B), 2207, Ass-1
P. 12
❖ Circuit
❖ Arduino codes
#include <IRremote.h>
int input_pin=8;// mention IR reciever connected pin
IRrecv irrecv(input_pin);
decode_results signals;
void setup() {
Serial.begin(9600);
irrecv.enableIRIn();
irrecv.blink13(true);
}
void loop() {
if (irrecv.decode(&signals)){//print decode signal
Serial.println(signals.value,HEX);//first lin hex
Serial.println(signals.value,BIN);//line binary
irrecv.resume();
}
}