# IRremote Send and Receive simultaneously

**URL:** <https://forum.arduino.cc/t/irremote-send-and-receive-simultaneously/960392>\
**Category:** Sensors\
**Created:** [February 17, 2022, 3:42pm UTC](https://forum.arduino.cc/t/irremote-send-and-receive-simultaneously/960392 "2022-02-17T15:42:01Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![DaveX](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/davex/32/751443_2.png) [@DaveX](https://forum.arduino.cc/u/DaveX)\
**Post date:** [February 17, 2022, 4:51pm UTC](https://forum.arduino.cc/t/irremote-send-and-receive-simultaneously/960392/2 "2022-02-17T16:51:23Z")

</div>

Could the emitted by the IR LED possibly be interfering with what is being received by the IR detector?

I'd rewrite the send fragment to not block the receiver processing from happening:

```cpp
  if (digitalRead(BUTTON_PIN) == LOW) {
    static unsigned long last = 0;
    now = millis();
    if (now - last > 120 ) { 
       last = now;
       IrSender.sendNEC(sAddress, sCommand, sRepeats);
    }
  }

```

As is, when the button is down, you only get a single chance to read one incoming signal per outgoing signal.

---

_[View the full topic](https://forum.arduino.cc/t/irremote-send-and-receive-simultaneously/960392)._
