IR remote command is stuck in While loop ! help me plz

General advise: don't use a while-loop for these things and don't use delay.

A simple solution might be to

  1. get rid of delay
  2. make the variable n a global variable and if another key is pressed, change n from 0 to 1 and test in algoritm.

To get rid of delay, you will have to implement algorithm as a finite state machine.

Your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with (nor for advise on) your project :wink: See About the IDE 1.x category.