adafruit / TinyLoRa

LoRaWAN Library
68 stars 37 forks source link

Really set the pinmode of _irq pin to INPUT #17

Closed chocotov1 closed 5 years ago

chocotov1 commented 5 years ago

Pinmode was obviously set wrong.

Have used the original code on an UNO and also on an ATmega328p on a breadbord with RFM95 module. Lora messages were sent and successfully received on the other end, but afterwards it would hang in the while loop reading the _irq pin at the end of RFM_Send_Package().

The high _irq pin (DIO0 on RFM95) wasn't being registered by digitalRead() and the current of the pin was sunk.

brentru commented 5 years ago

I've been using the Feather M0 w/RFM95 and Feather 32u4 w/RFM95 to test this library.

While the hang in the while loop doesn't seem effect these boards (they work the same before and after the pin direction switch), not setting the irq to an input might cause issues with Uno/ATMega328p like you mentioned. I'll merge this in.