-->
Page 1 of 1

LoRa and ESP8266 question

PostPosted: Sat Apr 13, 2019 11:55 am
by wendy
Hi,
I need to connect LoRa module and esp8266 , with Arduino core, so I need SPI pin (12-13-14) and other 3 pins for DIO0, RESET and NSS, but I need other 4 pins for my project.
I had think to use a port expander i2c to add pin, now my question is: if is possible to manage DIO0,RST and NSS , can I use pin of port expander for this scope?
Considering that GPIO 16 is used for sleep with esp-RST pin, GPIO 0 is pulled up and is DTR pin, GPIO 2 is also pulled up (I read to pullup 0 and 2 for correct internal wakeup of esp, I don't know if is correct, but pullin up this pin, internal wake up work better, for me), so remaining only pin 4 and 5.
I can use this 2 pins for i2c but before wiring all , I decided to ask if someone had have similar configuration.
thanks in advance

Re: LoRa and ESP8266 question

PostPosted: Sat Apr 13, 2019 5:27 pm
by torntrousers
You can use GPIO10 if you run the ESP in DIO mode. You can also usually get away with not using RESET on the LORA module. And you can use GPIO-0 and GPIO-2 on the ESP if you can pull them high for boot. So there's four pins :)

Re: LoRa and ESP8266 question

PostPosted: Sun Apr 14, 2019 3:34 am
by wendy
Hi, thanks for your answer.
I've read the README of LoRa library and they talk about the possibility to not use DIO0 . You say to not use RESET, but if I don't use RESET of LoRa, how can it perform reset if necessary? Is reset on LoRa mandatory or not?
Look at .cpp file seem not mandatory :

Code: Select allif (_reset != -1) {
    pinMode(_reset, OUTPUT);

    // perform reset
    digitalWrite(_reset, LOW);
    delay(10);
    digitalWrite(_reset, HIGH);
    delay(10);
  }


Have you tested this configuration?
If DIO0 and RST is not mandatory I can use only 4 pins for LoRa , 12-13-14 for spi and for example GPIO 0 to NSS, so I cn use 4 and 5 for i2c .
I notice that NSS go LOW only during transfer, so I think don't create problem with boot mode selection.
This afternoon I try , thanks

Re: LoRa and ESP8266 question

PostPosted: Mon Apr 15, 2019 12:31 am
by torntrousers
You only need the reset pin if you want to reset the LoRa module. It gets reset at power on so thats likely enough so I've often run without using the reset pin. Yes you can get away without DIO0 too. DIO0 is used to signal things like packet received so it depends on your usecase, eg if you can poll for received packets then you might not need DIO0 either.