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();
                                            }
                                            }
   7   8   9   10   11   12   13   14   15   16   17