-->
Page 1 of 2

Power Management for WiFi in Arduino IDE

PostPosted: Sun Jul 19, 2015 1:59 am
by owendelong
In my application, I want to essentially wake up, gather a bunch of data from various sensors, send that data to a web server and then go back to sleep.

Since it takes some time to gather the data from the sensors, I'm using the wakeup mode from deep sleep where the radio is not powered.

However, it's not entirely clear how to then power up the radio when I'm ready to start transmitting (actually a few seconds before so that it can associate with the AP in the background, but not burn too much battery while I'm doing the prep work.

Anyone have any Arduino IDE compatible working example code that does strict power management on the 8266?

I'm using the Huzzah breakouts from Adafruit, but I also have some Sparkfun modules as well.

Re: Power Management for WiFi in Arduino IDE

PostPosted: Sun Jul 19, 2015 4:03 am
by tytower
owendelong wrote:However, it's not entirely clear how to then power up the radio when I'm ready to start transmitting (actually a few seconds before so that it can associate with the AP in the background, but not burn too much battery while I'm doing the prep work.
Anyone have any Arduino IDE compatible working example code that does strict power management on the 8266?.

Well i have written an arduino ide code to do that in the wiki on this page (scroll up).
It wakes up ,reads sensors , sends the data and goes back to sleep. When the modem is not available it goes to sleep and checks back periodically. It ought to be fairly straightforward to alter it to allow whatever time you need to gather the data then connect then sleep . The act of deepSleep() closes the connection and restarts the chip from the start of the program.

Re: Power Management for WiFi in Arduino IDE

PostPosted: Sun Jul 19, 2015 12:35 pm
by owendelong
Any chance you could link the specific wiki article?

My previous search through the wiki and doing some poking around just now failed to identify it.

Re: Power Management for WiFi in Arduino IDE

PostPosted: Sun Jul 19, 2015 4:29 pm
by tytower