Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
The Magical Code Of The Secret Button
01-08-2016, 02:00 PM,
#1
The Magical Code Of The Secret Button
Hey,
in Pinguino IDE V11 there is an example called IRtransDemo.pde
The description says:
Quote:Send Power Off command when push button is pressed
push button, yes? I can't seem to find any button code in the sketch, so how does that button works?
The entire code:
Code:
/*
* IRtransDemo - demonstrates the IR remote library
* An IR led must be connected to a valid PWM pin through a 100 Ohm resistor.
* Send Power Off command when push button is pressed
* Target : Philips TV
* Protocol : RC5
*/

#define SEND_PIN 11    // must be a valid PWM pin

#define RC6_POWER_OFF 12

void setup()
{
    pinMode(USERLED, OUTPUT);
    digitalWrite(USERLED, ON);    
    IRremote.enabeIROut(SEND_PIN);     // Defined the Output pin
}

void loop()
{
    digitalWrite(USERLED, ON);    
    delay(100);
    IRremote.sendRC6(RC6_POWER_OFF, 14);
    digitalWrite(USERLED, OFF);    
    delay(900);
}

For me this code is sending Off command all the time... Any ideas?
Reply
01-08-2016, 09:53 PM,
#2
RE: The Magical Code Of The Secret Button
lol
From the example itself doesnt look like it. But id have to check library first to be sure. Id guess youre probably right Smile
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)