From 61c390f837941671b030ac77a06166adc4c12626 Mon Sep 17 00:00:00 2001 From: Morgan Allen Date: Fri, 2 Feb 2018 09:18:49 -0800 Subject: [PATCH] ensure pin DIO0 is set to input --- src/LoRa.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/LoRa.cpp b/src/LoRa.cpp index 1f75d15..5fb4256 100644 --- a/src/LoRa.cpp +++ b/src/LoRa.cpp @@ -279,6 +279,8 @@ void LoRaClass::onReceive(void(*callback)(int)) _onReceive = callback; if (callback) { + pinMode(_dio0, INPUT); + writeRegister(REG_DIO_MAPPING_1, 0x00); attachInterrupt(digitalPinToInterrupt(_dio0), LoRaClass::onDio0Rise, RISING);