title: Heltec ESP32 LoRa Receive Interrupt
body: <p>I’m trying to make a LoRa sender/receiver board.</p>
  <p>Therefore the plan is to send some messages whenever I want, but if there is an incoming packet, I want to interrupt the sending-process (for beginning without any sending retries) and receive the incoming packet.</p>
  <p>I tried the mix of the Heltec examples “OLED_LoRa_Sender” and “LoRaReceiverInterrupt”, and it works fine until I’m sending and receiving a message at the same time. Then the receive interrupt does not interrupt.</p>
  <p>How can I solve that?</p>
  <p>Thanks a lot in advance</p>
  <pre><code>  if (sendMsg &amp;&amp; !receivingMsg) { // sendMsg drives true, if PRG button is pressed receivingMsg drives try in &quot;void onReceive(int packetSize)&quot;
      /*
      Heltec.display-&gt;clear();
      Heltec.display-&gt;setTextAlignment(TEXT_ALIGN_LEFT);
      Heltec.display-&gt;setFont(ArialMT_Plain_10);
  
      //Serial.println(WiFi.macAddress());
      Heltec.display-&gt;drawString(0, 0, &quot;Sending packet: &quot;);
      Heltec.display-&gt;drawString(0, 15, WiFi.macAddress());
      Heltec.display-&gt;drawString(100, 15, String(counter));
      Heltec.display-&gt;display();
      */
      LoRa.beginPacket();
      LoRa.setTxPower(14,RF_PACONFIG_PASELECT_PABOOST);
      LoRa.print(&quot;hello &quot;);
      LoRa.print(counter);
      LoRa.endPacket();
  
      delay(10); // give me time to bring up serial monitor
  
      counter++;
  
      // put the radio into receive mode
      LoRa.receive();
  
      sendMsg = false;
    }
      
  }
  </code></pre>