Closed paidforby closed 4 years ago
Double check the board pinout. And try to put this before LoRa.begin
SPI.begin(LORA_SCK, LORA_MISO, LORA_MOSI, LORA_SS); LoRa.setPins(LORA_SS, LORA_RESET, LORA_DIO0);
Very nice!
@IoTThinks your suggestion worked. I knew it was something with the SPI settings.
To clarify, I just added,
SPI.begin(LORA_SCK, LORA_MISO, LORA_MOSI, LORA_CS);
before
LoRa.setPins(LORA_CS, LORA_RST, LORA_IRQ);
in my original example. Either, LORA_IRQ
or LORA_IO0
will work since they are both aliased to 23
.
Thanks!
Hey there! I am receiving
Starting LoRa failed
while using the demo code. I've seen FAQ #1 about using setPins, but am still not able to solve my problem,I've been trying to get the Pycom LoPy4 working with this library. I'm using the most simple example, LoRaSender, and I've set the pins according to the API docs and Pycom's documentation, but LoRa is still failing to start.
My test code looks like this,
where
LORA_CS
,LORA_RST
,LORA_IRQ
are defined as18
,-1
, and23
in the arduino-esp32 variants, here https://github.com/espressif/arduino-esp32/blob/master/variants/lopy4/pins_arduino.h#L14. Note: I've also tried passing the raw integers tosetPins()
.The LoPy4's pinout can be found here, https://docs.pycom.io/datasheets/development/lopy/#app
I am thinking that the problem has something to do with the SPI settings,
LORA_MISO
is19
,LORA_MOSI
is27
, andLORA_CS
is18
, but there is another SPI interface on pins37
,22
, and13
. Maybe the library is having trouble choosing the correct SPI? Or maybe I am missing something more obvious. I've tried setting the SPI frequency to10E6
and8E6
. I've also tried setting the SPI interface to something else, likeSPI0
orSPI1
, but those don't exist. Wonder if anyone has had any success with the LoPy4 and this library. The only mentions of Pycom or LoPy4 in other issues were not helpful.Any advice would be greatly appreciated!