mcci-catena / arduino-lmic

LoraWAN-MAC-in-C library, adapted to run under the Arduino environment
https://forum.mcci.io/c/device-software/arduino-lmic/
MIT License
640 stars 208 forks source link

Wrong PIN mapping in example #279

Closed SmithyAT closed 5 years ago

SmithyAT commented 5 years ago

For the Adafruit Feather 32u4, there is a wrong pin mapping in the examples and therefor RX is not working.

#elif defined(ARDUINO_AVR_FEATHER32U4)

You have to change this line to this mapping: .dio = {7, 6, LMIC_UNUSED_PIN},

Additionally, solder wire as described on the Adafruit website from DIO1 to D6.

terrillmoore commented 5 years ago

Really?! You are right, according to the schematic, they wire IRQ to D7, not D3 as on the M0 LoRa. I would not have suspected that. D7 doesn't come to a pin on the AVR32, but D3 does; whereas neither D3 nor D7 come to pins on the Feather M0. Oh well. Sorry, I should have checked more closely when I added this. Thanks for pointing this out.

SmithyAT commented 5 years ago

No problem at all. I was just wondering why I never got a JOINED message and then started to look deeper but haven't checked the pin mapping. Later I remembered that there is a difference on the Adafruit website and bingo, the sketch is working.