Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 2
    side note: (My_Decoder.value==0xFF807F && My_Decoder.value!=0xFF0AF5) if My_Decoder.value is 0xFF807F then it's a fairly safe bet that it's not 0xFF0AF5 which means the condition can be simplified to (My_Decoder.value==0xFF807F) Commented Jul 11, 2017 at 13:13
  • @Andrew I had been working previously with the simplified condition you offered but with no different results. Commented Jul 11, 2017 at 15:06
  • Yes, the reason for the infinite loop is exactly what Look Alterno pointed out, the value of My_Decode.value never changes within the while loop so if the condition is true at the start then it'll remain to be true forever. You need to fix that by somehow including updating My_Decoder within the loop. You can do that by either adding code within the while or by changing the while into an if and relying on the loop() function to create your loop. This was just a minor tidy up to remove redundant logic. Commented Jul 11, 2017 at 15:13