Go Down

Topic: Iremote problem (Read 2203 times) previous topic - next topic

Geek Ionizado

I'm using the Iremote lib and my LG controller is: when I press any button, he send the code of this button one time ex: 551489775, and then starts sending a confirmation number (4294967295) that is being sent until I release the button. I wrote a code to verify if the power button were pressed and then turn a led on until I release the power button. But It's not working!

if (remote()=="551489775") {
    while(remote()=="4294967295") {
digitalWrite(led, HIGH);
     digitalWrite(led, LOW);

//The function
String remote () {
  String code = "";
 if (irrecv.decode(&results)) {
   code += String (results.value, HEX);
   irrecv.resume(); // Receive the next value

Geek Ionizado

Detail: this confirmation number is the same for ALL the buttons, so that's why I need to verify the code of the button first.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131