Serial.println("IR Receiver Button Decode") Serial.begin(9600) // To Start Serial communication PinMode(Blueled,OUTPUT) // Define the pin of arduino for OUTPUT PinMode(Greenled,OUTPUT) // Define the pin of arduino for OUTPUT PinMode(Redled,OUTPUT) // Define the pin of arduino for OUTPUT Void setup() // Setup code which runs once time IRrecv irrecv(receiver) // create exemplar of 'irrecv'ĭecode_results results // create exemplar of 'decode_results' Int Blueled=10 // initialize Blue Led on Digital Pin 10 of Arduino ![]() Int Greenled=9 // initialize Green Led on Digital Pin 9 of Arduino Int Redled= 13 // initialize the Red Led on Digital Pin 13 of Arduino Int receiver = 11 Signal Pin of IR receiver to Arduino Digital Pin 11 When we will press ‘2’ from the remote, the will LED turn OFF. When we will press ‘1’ from the remote, the LED will turn ON. This received data will be decoded and used to control the onboard LED of Arduino board connected at pin 13. ![]() We will use an IR remote control to send data to the receiver module. Copy the code given below in that file and save it. ![]() Open your Arduino IDE and go to File > New.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |