sandeepmistry / arduino-LoRa

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

Arduino Due fails #427

Closed Keyxss closed 3 years ago

Keyxss commented 3 years ago

I am receiving Starting LoRa failed every time I run the program on my Arduino Due, but when I plug in Arduino Uno it works perfectly fine. I use Lo Ra-02 sx1278. I run the basic sender program and it fails. What could be the problem? Does in not work on Arduino Due?

IoTThinks commented 3 years ago

How do you so the wiring? Any screenshot?

Check if the Due uses 3.3v or 5v logic. You may need logic converter if the board uses 5v logic.

Likely either wrong SPI wiring or logic level.

Keyxss commented 3 years ago
Screenshot 2021-01-24 at 14 30 53
IoTThinks commented 3 years ago

Double check the SPI pins. spi

Different Arduino boards (Nano, Uno, Mega, Due...) may have different SPI pins.

Your wiring seems to be for Uno instead. Arduino-Uno-R3-Pinouts

Keyxss commented 3 years ago
Screenshot 2021-01-25 at 09 13 30

I changed the pins according to that table, and it still does not work. Also I found here that Arduino UNO use 5v logic. Maybe that it the problem.

IoTThinks commented 3 years ago

3.3v logic is better than 5v logic. For 5v logic boards, sometimes you need a logic converter to 3.3v.

Normally, only 3 issues:

  1. Wrong SPI pins. Check if the DIO0 is wired to interruptable GPIO.
  2. Wrong logic level. Sometimes, a logic converter to 3.3v is needed.
  3. Not enough power for LoRa. Up to 100mA.
Keyxss commented 3 years ago

Somehow it worked. Thank you very much for your help

IoTThinks commented 3 years ago

@Keyxss How did you fix it?

Keyxss commented 3 years ago

I checked the wiring one more time, and plugged it in from another computer.

IoTThinks commented 3 years ago

Ok enjoy.

Keyxss commented 3 years ago

Again thanks a lot for your time. It was my fault that I did not checked spi ports. I couldn't find anything on the internet. So I asked here.