sandeepmistry / arduino-LoRa

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

Waking up arduino on receiving data #535

Open ShadowKing782k opened 2 years ago

ShadowKing782k commented 2 years ago

I want to put my arduino in sleep mode, it should wake up on receiving data from receiver LoRa. Is it possible to do that??..If it's possible can u please tell me the procedure to do that...Thanks in Advance : )

IoTThinks commented 2 years ago
  1. Use onReceive() ISR
  2. Leave your LoRa in Receive mode.
  3. When there is some LoRa message, DIO0 will go HIGH.
  4. You have to set DIO0 to wake up the Arduino.

BTW, LoRa in Receive mode still consume battery. So be aware of that.

hoseinaghajari commented 2 years ago
  1. Use onReceive() ISR
  2. Leave your LoRa in Receive mode.
  3. When there is some LoRa message, DIO0 will go HIGH.
  4. You have to set DIO0 to wake up the Arduino.

BTW, LoRa in Receive mode still consume battery. So be aware of that.

I tested that a lot but I've found that when we put Arduino to sleep mode, LoRa module can't receive or sent anymore. so from my point of view, LoRa and its DIO pins can't do that for us. did you tested that?

wlwatkins commented 2 years ago

I had to call LoRa.receive() after waking up

wedevelper commented 8 months ago

I am having the same issue. I am using ESP32 and when i put it in light sleep mode, LoRa module sx1278 then stops receiving any data. When it is normally operating the DIO0 goes high till i read it and goes low after reading data. But in sleep mode it goes to low. I want to wake up my ESP32 when there is something received on LoRa module. If anyone has tried and got the results please let me know.