Tapatalk

How to Awaken the Radio

How to Awaken the Radio

18

PostApr 10, 2018#1

I am testing for low power and I would like the radio to be asleep all the time, except for when it is time to send the message. 

Just like myRadio.sleep() to put the radio to sleep, is there or what it is the function to awaken the radio from sleep. 

I looked at RF95 library, did not find something to awaken the radio.

void setup() {
  
  // Radio - Initialize the radio and put it to sleep to save energy
myRadio.init();
myRadio.sleep();

  // Flash - We're not using, so just power it down to save energy
myFlash.init(T2_WPN_FLASH_SPI_CS);
myFlash.powerDown();
}

void loop() {
  // put your main code here, to run repeatedly
  
LowPower.powerDown(SLEEP_8S, ADC_OFF,BOD_OFF); 

}

1885
1885

PostApr 12, 2018#2

You don't need to specifically wake the radio. When you use the .recv() or .send() methods the library takes care of it.

The RadioHead library documentation for RFM95 can be found here: http://www.airspayce.com/mikem/arduino/ ... _RF95.html - the library does not implement all functionalities for the Radio IC but covers a good part of it.

18

PostApr 12, 2018#3

Thank you for your reply.

By trial and error I discovered when I put the radio to sleep in setup and then powerdown the MCU, when waking up the MCU through interrupt pin the radio would not consistently send messages. I am not sure what could have been the reason. 

When I moved the myradio.sleep() into loop, it was functioning properly.