Is there anyway to have holding down different buttons on a IR remote do different things?

-1

I am new to arduino programming, so please do not just outright give the solution to me, I would like to learn a little as well. I know that holding down a button on my IR remote sends the code 0xFFFFFFFF. The only thing is that this is for holding down any button. Is there any way to have holding down different buttons do different things? I tried the following after some advice from the comments, but I still cannot get it to work.

if (results.value == 0xFF906F)
    {
      var = 0xFF906F;
    }
  if (results.value == 0xFFFFFFFF)
    {
      if (var == 0xFF906F)
        {
          digitalWrite(2, HIGH);
          digitalWrite(3, LOW);
        }
    }
arduino
infrared
asked on Stack Overflow Jun 2, 2020 by ThSlipperyKraken • edited Jun 5, 2020 by ThSlipperyKraken

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0