Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pinguino 4550 - IR Remote Control Decoding
02-06-2017, 03:11 AM,
#4
RE: Pinguino 4550 - IR Remote Control Decoding
(01-06-2017, 04:03 PM)Aldeen19 Wrote: Thank you Fred that's kind of you and I'll be waiting.

Code:
/*
* DecodeRemote: demonstrates decoding IR codes from a remote control
* An IR detector/demodulator must be connected to the input IRSENSOR.
* Version 0.1 March, 2014
* Author : Regis Blanchot
*/

int RECV_PIN = 2;   // can be any digital pin

decode_results results;

void setup()
{    
   pinMode(11,OUTPUT);
   pinMode(12,OUTPUT);
     
   IRremote.enableIRIn(RECV_PIN);
  IRremote.blink(TRUE);

}

void loop()
{  
   if (IRremote.decode(&results))
   {
   
       if (results.value == 0xF274ADF) {  // button 1
   digitalWrite(11,HIGH);  
   
 }
 if ( results.value == 0x56C403) {   //// button stop
 digitalWrite(12,HIGH);
 
 
 }
       IRremote.resume(); // Receive the next value
   }
}
Aldeen
 try this i used my own code and it worked.
fred
Reply


Messages In This Thread
RE: Pinguino 4550 - IR Remote Control Decoding - by derf158 - 02-06-2017, 03:11 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)