Is the DIO0 Pin used in the Lora Library?

Hi Everyone.

I use: 2 x Lora RA01 with 2 x Nanos with the Lora library.

Testing the LoraReceive and LoraTransmit code from the library un modified.
Sometimes one of the units hangs up , pressing the Reset button on the Nano either the Rx or Tx side or both get the comms started.

When the units is working:
I checked with my scope , there is constant data (pulses) on CLK,MISO and MOSI but the DIO0 pin never changes even removing this connection to PIN2 on the Nano makes no difference.

Is the DIO0 pin used in the Library?

Thanks in advance.

Depends what you mean by 'the' LoRa library since there are several.

So read through the library in question and check.

Normally DIO0 is used to indicate RX and TX done, though it might only pulse high very briefly.

which library?
which code are using?

Lora Library installed via Library Manager , Sandeep Mistry Ver 0.8.0.

In the Library , I found this .

{
  if (isTransmitting()) {
    return 0;
  }

and

bool LoRaClass::isTransmitting()
{
  if ((readRegister(REG_OP_MODE) & MODE_TX) == MODE_TX) {
    return true;
  }

The rest of the library is not user friendly for DIY Homebrew Hobby playing with Arduinos.

From the Library examples LoRaReiver and LoRaSender.

Well, not using the DIO0 pin, and thus having to repeatadly read the internal registers of the SX127x for RX does does save an IO pin.

However in weak signal conditions this can loose a bit of sensitivity, and range, due to the EMI produced by the constant activity on the SPI bus, and its worse the faster the CPU is.

However that library does provide the option to use the DIO0 in the normal way, if you choose.

Thanks.

Strange that so many videos and web sites use the same Library and they all connect the DIO0 Pin , nobody care to check. So seems like it is just a copy of the original and a copy of a copy and every person just put his name on the new "not really" my own project.

The same goes for the LCD Vo pin were the variable resistor is connected between + and - supply , all a copy of a copy just to add a persons name to something.

I have not digged into this library to much, but if you feel something is missing , you should fill an issue report:
https://github.com/sandeepmistry/arduino-LoRa

Well, its good to have the choice, though my preference is to use DIO0 for TXDONE and RXDONE as this then allows the calling sketch to easily check, in a loop by reading the DIO0 pin, if the transmitted packet has gone or a packet has been received.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.