sandeepmistry / arduino-LoRa

An Arduino library for sending and receiving data using LoRa radios.
MIT License
1.61k stars 621 forks source link

What to do with DIO1 through 5 #580

Open wlwatkins opened 2 years ago

wlwatkins commented 2 years ago

Hi,

I'm getting this library to work very well and am quite happy with it. However, I am curious on what the DIO1 through 5 can be used for. Indeed, when starting LoRa one can set the callback pin to DIO0 but how are the other pins used?

Kongduino commented 2 years ago

It is quite complex, and depends on many factors. First, the uses of DIOØ to 5 depends on whether the chip is in Continuous Mode or in Packet Mode. Then, it depends on the state the chip is in: Sleep, Standby, FSRxTx, Rx, Tx. And finally, it depends on which setting it is on: each pin has 4 states ØØ to 11. This is detailed in the Semtech SX1276, SX1277, SX1278, SX1279 Datasheet. Here are a couple of tables.

Table 29

Table 30

Their configuration is controlled through RegDioMapping1 and RegDioMapping2.

RegDioMapping