From 5d4680709fc04325e726f349076b9927fee7e08b Mon Sep 17 00:00:00 2001 From: jgromes Date: Wed, 2 Oct 2019 18:54:55 +0200 Subject: [PATCH] [SX126x] Fixed incorrect example (#50) --- .../SX126x_Receive_Interrupt/SX126x_Receive_Interrupt.ino | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/SX126x/SX126x_Receive_Interrupt/SX126x_Receive_Interrupt.ino b/examples/SX126x/SX126x_Receive_Interrupt/SX126x_Receive_Interrupt.ino index 3be3d64b..84434f93 100644 --- a/examples/SX126x/SX126x_Receive_Interrupt/SX126x_Receive_Interrupt.ino +++ b/examples/SX126x/SX126x_Receive_Interrupt/SX126x_Receive_Interrupt.ino @@ -110,6 +110,9 @@ void loop() { // reset flag receivedFlag = false; + // put module to standby while reading data + lora.standby(); + // you can read received data as an Arduino String String str; int state = lora.readData(str); @@ -149,6 +152,9 @@ void loop() { } + // put module back to listen mode + lora.startReceive(); + // we're ready to receive more packets, // enable interrupt service routine enableInterrupt = true;