We want to test the battery life for modem, light, deep sleep and hibernation when waking up every 5 minutes to send one POST request to an external sinatra server.
Setup
Web server that logs time
This will be hosted on the LAN on a computer which is running 24/7.
$ export FLASK_APP=main (name of file running server ie main.py)$ export FLASK_ENV=development ( old method - use debug instead )$ flask run –host=0.0.0.0
(new method)
SHELL
$ flask --app main run --debug--host=0.0.0.0
Sinatra
RUBY
require'sinatra/base'classMain<Sinatra::Basesetbind:"0.0.0.0"get'/'doifFile.exist?("readings.log")File.readlines("readings.log")else"No readings, log file doesn't exist."endendget'/log'do# Collect params, board=esp32 and test=lightsleep## curl "http://127.0.0.1/log?board=esp32&test=lightsleep"# curl "http://10.1.1.11:4567/log?board=esp32&test=lightsleep"board=params[:board]test=params[:test]# Define the variableoutput="#{board},#{test},#{Time.now}\n"# Write to a fileFile.write("readings.log",output,mode:"a")outputendendMain.run!
Install Ruby and dependencies
SHELL
$ curl https://mise.run | sh
$ sudo apt install libyaml-dev libffi-dev
$ mise install ruby@latest
$ bundle
require'sinatra/base'require'debug'classMain<Sinatra::Basesetbind:"0.0.0.0"defcreate_outputoutput=File.readlines("readings.log")# Get the first line from filestart_test=output.firstcurrent_test=output.firstprevious_test=output.firstoutput_a=[]output.each_with_indexdo|line,index|current_test=line# Check for a change in test or end of fileifcurrent_test.split(",")[1]!=previous_test.split(",")[1]orindex==(output.count-1)# Record the test into the hashoutput_a<<{test:start_test.split(",")[1],start:start_test.split(",")[2],end:previous_test.split(",")[2]}# Set the new starting linestart_test=current_test.cloneend# Keep goingprevious_test=current_test.cloneendoutput_aendget'/'doifFile.exist?("readings.log")@output=create_outputerb:outputelse"No readings, log file doesn't exist."endendget'/log'do# Collect params, board=esp32 and test=lightsleep## curl "http://127.0.0.1/log?board=esp32&test=lightsleep"# curl "http://10.1.1.11:4567/log?board=esp32&test=lightsleep"board=params[:board]test=params[:test]# Define the variableoutput="#{board},#{test},#{Time.now}\n"# Write to a fileFile.write("readings.log",output,mode:"a")outputendendMain.run!
# Give us the duration in hoursduration=(Time.new(end_date)-Time.new(start_date))/3600ifduration<=24duration="#{duration.to_i}hrs"elsifduration>24duration="#{(duration/24).to_i}d / #{(duration%24).to_i}hrs"end# Record the test into the hashoutput_a<<{test:start_test.split(",")[1],start:start_date,end:end_date,duration:duration}
Setup ESP32
Load code for each test which should do the following
Wake every 5 minutes
Connect to WIFI 2.4Ghz
Send a POST request to our webserver
Include text “experiment #1”
Goes to sleep
Connect 18650 to run ESP32 via Sunflower Solar Power
Monitor how long it lasts
From the webserver we could get stats through the SQL looking at the posts we could calculate how long it’s lasted.
Test: Blink example
C
intLED_BUILTIN=2;// the setup function runs once when you press reset or power the boardvoidsetup(){// initialize digital pin LED_BUILTIN as an output.pinMode(LED_BUILTIN,OUTPUT);}// the loop function runs over and over again forevervoidloop(){digitalWrite(LED_BUILTIN,HIGH);// turn the LED on (HIGH is the voltage level)delay(1000);// wait for a seconddigitalWrite(LED_BUILTIN,LOW);// turn the LED off by making the voltage LOWdelay(1000);// wait for a second}
Uploading
Load ArduinoIDE
Select ttyUSB
Select Board “ESP32 Dev Module”
NOTE: On Micks I had to hold the BOOT button when uploading
Connection code DRAFT #1: Danch using weather station
This same code will be ran on the ESP32, pico W, pico 2 W, STM
NOTE: In the no sleep it doesn’t have to do the setup everytime hence the lower POST reading.
Experiment #1: No Sleep
NOTE: Adjust the wake in this first experiment so that it lasts the least amount of time. So we might want to do every one minute, but not less than a minute.
C
#include<WiFi.h>
#include<HTTPClient.h>
#include<string>usingnamespacestd;voidwifi_connect(){WiFi.begin("[SSID]","[PASSWORD]");Serial.println("Connecting");while(WiFi.status()!=WL_CONNECTED){delay(500);Serial.print(".");}Serial.println("Connected");}voidsetup(){Serial.begin(115200);while(!Serial);/* ? */Serial.println("Sleep experiment");wifi_connect();}voidloop(){//Check WiFi connection statusif(WiFi.status()==WL_CONNECTED){HTTPClienthttp;// Your Domain name with URL path or IP address with pathhttp.begin("http://[SERVERIP]:4567/log?board=esp32&test=nosleep");// Send HTTP GET requestinthttpResponseCode=http.GET();if(httpResponseCode==200){Serial.print("Success");}else{Serial.print("Error code: ");Serial.println(httpResponseCode);}// Free resourceshttp.end();/* esp_sleep_enable_timer_wakeup(300 * 1000000); //light sleep for 5 minutes *//* esp_light_sleep_start(); */}else{Serial.println("WiFi Disconnected. Attempting to re-connect");wifi_connect();}delay(300000)/* 5 minutes */}
Experiment #2: Modem Sleep?
Experiment #3: Light Sleep
CPP
#include<HTTPClient.h>
#include<string>
#include"esp_wifi.h"usingnamespacestd;#define uS_TO_S_FACTOR 1000000 /* Conversion factor for micro seconds to seconds */
#define TIME_TO_SLEEP 300 /* Time ESP32 will go to sleep (in seconds) */voidwifi_connect(){WiFi.begin("[SSID]","[PASSWORD]");Serial.println("Connecting");while(WiFi.status()!=WL_CONNECTED){delay(500);Serial.print(".");}Serial.println("Connected");}voidsetup(){Serial.begin(115200);while(!Serial);/* ? */Serial.println("Sleep experiment");wifi_connect();}intcounter=0;voidloop(){//Check WiFi connection statusif(WiFi.status()==WL_CONNECTED){HTTPClienthttp;// Your Domain name with URL path or IP address with pathhttp.begin("http://10.1.1.11:4567/log?board=esp32&test=lightsleep");// Send HTTP GET requestinthttpResponseCode=http.GET();if(httpResponseCode==200){Serial.print("Success");}else{Serial.print("Error code: ");Serial.println(httpResponseCode);}// Free resourceshttp.end();// Need to stop wifi before sleeping, then start again.esp_wifi_stop();esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP*uS_TO_S_FACTOR);esp_light_sleep_start();esp_wifi_start();}else{Serial.println("WiFi Disconnected. Attempting to re-connect");wifi_connect();}//delay(300000); /* 5 minutes */}
C
#include<HTTPClient.h>
#include<string>
#include"esp_wifi.h"usingnamespacestd;#define uS_TO_S_FACTOR 1000000 /* Conversion factor for micro seconds to seconds */
#define TIME_TO_SLEEP 300 /* Time ESP32 will go to sleep (in seconds) */voidwifi_connect(){WiFi.begin("[SSID]","[PASSWORD]");Serial.println("Connecting");while(WiFi.status()!=WL_CONNECTED){delay(500);Serial.print(".");}Serial.println("Connected");}voidsetup(){Serial.begin(115200);while(!Serial);/* ? */Serial.println("Sleep experiment");wifi_connect();}intcounter=0;voidloop(){//Check WiFi connection statusif(WiFi.status()==WL_CONNECTED){HTTPClienthttp;// Your Domain name with URL path or IP address with pathhttp.begin("http://10.1.1.11:4567/log?board=esp32&test=lightsleep");// Send HTTP GET requestinthttpResponseCode=http.GET();if(httpResponseCode==200){Serial.print("Success");}else{Serial.print("Error code: ");Serial.println(httpResponseCode);}// Free resourceshttp.end();// Need to stop wifi before sleeping, then start again.esp_wifi_stop();esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP*uS_TO_S_FACTOR);esp_light_sleep_start();esp_wifi_start();}else{Serial.println("WiFi Disconnected. Attempting to re-connect");wifi_connect();}//delay(300000); /* 5 minutes */}
C
#include<HTTPClient.h>
#include<string>
#include"esp_wifi.h"usingnamespacestd;#define uS_TO_S_FACTOR 1000000 /* Conversion factor for micro seconds to seconds */
#define TIME_TO_SLEEP 300 /* Time ESP32 will go to sleep (in seconds) */voidwifi_connect(){WiFi.begin("[SSID]","[PASSWORD]");Serial.println("Connecting");while(WiFi.status()!=WL_CONNECTED){delay(500);Serial.print(".");}Serial.println("Connected");}voidsetup(){Serial.begin(115200);while(!Serial);/* ? */Serial.println("Sleep experiment");wifi_connect();}intcounter=0;voidloop(){//Check WiFi connection statusif(WiFi.status()==WL_CONNECTED){HTTPClienthttp;// Your Domain name with URL path or IP address with pathhttp.begin("http://10.1.1.11:4567/log?board=esp32&test=lightsleep");// Send HTTP GET requestinthttpResponseCode=http.GET();if(httpResponseCode==200){Serial.print("Success");}else{Serial.print("Error code: ");Serial.println(httpResponseCode);}// Free resourceshttp.end();// Need to stop wifi before sleeping, then start again.esp_wifi_stop();esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP*uS_TO_S_FACTOR);esp_light_sleep_start();esp_wifi_start();}else{Serial.println("WiFi Disconnected. Attempting to re-connect");wifi_connect();}//delay(300000); /* 5 minutes */}
C
#include<HTTPClient.h>
#include<string>
#include"esp_wifi.h"usingnamespacestd;#define uS_TO_S_FACTOR 1000000 /* Conversion factor for micro seconds to seconds */
#define TIME_TO_SLEEP 300 /* Time ESP32 will go to sleep (in seconds) */voidwifi_connect(){WiFi.begin("[SSID]","[PASSWORD]");Serial.println("Connecting");while(WiFi.status()!=WL_CONNECTED){delay(500);Serial.print(".");}Serial.println("Connected");}voidsetup(){Serial.begin(115200);while(!Serial);/* ? */Serial.println("Sleep experiment");wifi_connect();}intcounter=0;voidloop(){//Check WiFi connection statusif(WiFi.status()==WL_CONNECTED){HTTPClienthttp;// Your Domain name with URL path or IP address with pathhttp.begin("http://10.1.1.11:4567/log?board=esp32&test=lightsleep");// Send HTTP GET requestinthttpResponseCode=http.GET();if(httpResponseCode==200){Serial.print("Success");}else{Serial.print("Error code: ");Serial.println(httpResponseCode);}// Free resourceshttp.end();// Need to stop wifi before sleeping, then start again.esp_wifi_stop();esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP*uS_TO_S_FACTOR);esp_light_sleep_start();esp_wifi_start();}else{Serial.println("WiFi Disconnected. Attempting to re-connect");wifi_connect();}//delay(300000); /* 5 minutes */}
C
#include<HTTPClient.h>
#include<string>
#include"esp_wifi.h"usingnamespacestd;#define uS_TO_S_FACTOR 1000000 /* Conversion factor for micro seconds to seconds */
#define TIME_TO_SLEEP 300 /* Time ESP32 will go to sleep (in seconds) */voidwifi_connect(){WiFi.begin("[SSID]","[PASSWORD]");Serial.println("Connecting");while(WiFi.status()!=WL_CONNECTED){delay(500);Serial.print(".");}Serial.println("Connected");}voidsetup(){Serial.begin(115200);while(!Serial);/* ? */Serial.println("Sleep experiment");wifi_connect();}intcounter=0;voidloop(){//Check WiFi connection statusif(WiFi.status()==WL_CONNECTED){HTTPClienthttp;// Your Domain name with URL path or IP address with pathhttp.begin("http://10.1.1.11:4567/log?board=esp32&test=lightsleep");// Send HTTP GET requestinthttpResponseCode=http.GET();if(httpResponseCode==200){Serial.print("Success");}else{Serial.print("Error code: ");Serial.println(httpResponseCode);}// Free resourceshttp.end();// Need to stop wifi before sleeping, then start again.esp_wifi_stop();esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP*uS_TO_S_FACTOR);esp_light_sleep_start();esp_wifi_start();}else{Serial.println("WiFi Disconnected. Attempting to re-connect");wifi_connect();}//delay(300000); /* 5 minutes */}
C
#include<HTTPClient.h>
#include<string>
#include"esp_wifi.h"usingnamespacestd;#define uS_TO_S_FACTOR 1000000 /* Conversion factor for micro seconds to seconds */
#define TIME_TO_SLEEP 300 /* Time ESP32 will go to sleep (in seconds) */voidwifi_connect(){WiFi.begin("[SSID]","[PASSWORD]");Serial.println("Connecting");while(WiFi.status()!=WL_CONNECTED){delay(500);Serial.print(".");}Serial.println("Connected");}voidsetup(){Serial.begin(115200);while(!Serial);/* ? */Serial.println("Sleep experiment");wifi_connect();}intcounter=0;voidloop(){//Check WiFi connection statusif(WiFi.status()==WL_CONNECTED){HTTPClienthttp;// Your Domain name with URL path or IP address with pathhttp.begin("http://10.1.1.11:4567/log?board=esp32&test=lightsleep");// Send HTTP GET requestinthttpResponseCode=http.GET();if(httpResponseCode==200){Serial.print("Success");}else{Serial.print("Error code: ");Serial.println(httpResponseCode);}// Free resourceshttp.end();// Need to stop wifi before sleeping, then start again.esp_wifi_stop();esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP*uS_TO_S_FACTOR);esp_light_sleep_start();esp_wifi_start();}else{Serial.println("WiFi Disconnected. Attempting to re-connect");wifi_connect();}//delay(300000); /* 5 minutes */}
C
#include<HTTPClient.h>
#include<string>
#include"esp_wifi.h"usingnamespacestd;#define uS_TO_S_FACTOR 1000000 /* Conversion factor for micro seconds to seconds */
#define TIME_TO_SLEEP 300 /* Time ESP32 will go to sleep (in seconds) */voidwifi_connect(){WiFi.begin("[SSID]","[PASSWORD]");Serial.println("Connecting");while(WiFi.status()!=WL_CONNECTED){delay(500);Serial.print(".");}Serial.println("Connected");}voidsetup(){Serial.begin(115200);while(!Serial);/* ? */Serial.println("Sleep experiment");wifi_connect();}intcounter=0;voidloop(){//Check WiFi connection statusif(WiFi.status()==WL_CONNECTED){HTTPClienthttp;// Your Domain name with URL path or IP address with pathhttp.begin("http://10.1.1.11:4567/log?board=esp32&test=lightsleep");// Send HTTP GET requestinthttpResponseCode=http.GET();if(httpResponseCode==200){Serial.print("Success");}else{Serial.print("Error code: ");Serial.println(httpResponseCode);}// Free resourceshttp.end();// Need to stop wifi before sleeping, then start again.esp_wifi_stop();esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP*uS_TO_S_FACTOR);esp_light_sleep_start();esp_wifi_start();}else{Serial.println("WiFi Disconnected. Attempting to re-connect");wifi_connect();}//delay(300000); /* 5 minutes */}
C
#include<HTTPClient.h>
#include<string>
#include"esp_wifi.h"usingnamespacestd;#define uS_TO_S_FACTOR 1000000 /* Conversion factor for micro seconds to seconds */
#define TIME_TO_SLEEP 300 /* Time ESP32 will go to sleep (in seconds) */voidwifi_connect(){WiFi.begin("[SSID]","[PASSWORD]");Serial.println("Connecting");while(WiFi.status()!=WL_CONNECTED){delay(500);Serial.print(".");}Serial.println("Connected");}voidsetup(){Serial.begin(115200);while(!Serial);/* ? */Serial.println("Sleep experiment");wifi_connect();}intcounter=0;voidloop(){//Check WiFi connection statusif(WiFi.status()==WL_CONNECTED){HTTPClienthttp;// Your Domain name with URL path or IP address with pathhttp.begin("http://10.1.1.11:4567/log?board=esp32&test=lightsleep");// Send HTTP GET requestinthttpResponseCode=http.GET();if(httpResponseCode==200){Serial.print("Success");}else{Serial.print("Error code: ");Serial.println(httpResponseCode);}// Free resourceshttp.end();// Need to stop wifi before sleeping, then start again.esp_wifi_stop();esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP*uS_TO_S_FACTOR);esp_light_sleep_start();esp_wifi_start();}else{Serial.println("WiFi Disconnected. Attempting to re-connect");wifi_connect();}//delay(300000); /* 5 minutes */}
C
#include<HTTPClient.h>
#include<string>
#include"esp_wifi.h"usingnamespacestd;#define uS_TO_S_FACTOR 1000000 /* Conversion factor for micro seconds to seconds */
#define TIME_TO_SLEEP 300 /* Time ESP32 will go to sleep (in seconds) */voidwifi_connect(){WiFi.begin("[SSID]","[PASSWORD]");Serial.println("Connecting");while(WiFi.status()!=WL_CONNECTED){delay(500);Serial.print(".");}Serial.println("Connected");}voidsetup(){Serial.begin(115200);while(!Serial);/* ? */Serial.println("Sleep experiment");wifi_connect();}intcounter=0;voidloop(){//Check WiFi connection statusif(WiFi.status()==WL_CONNECTED){HTTPClienthttp;// Your Domain name with URL path or IP address with pathhttp.begin("http://10.1.1.11:4567/log?board=esp32&test=lightsleep");// Send HTTP GET requestinthttpResponseCode=http.GET();if(httpResponseCode==200){Serial.print("Success");}else{Serial.print("Error code: ");Serial.println(httpResponseCode);}// Free resourceshttp.end();// Need to stop wifi before sleeping, then start again.esp_wifi_stop();esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP*uS_TO_S_FACTOR);esp_light_sleep_start();esp_wifi_start();}else{Serial.println("WiFi Disconnected. Attempting to re-connect");wifi_connect();}//delay(300000); /* 5 minutes */}
C
#include<HTTPClient.h>
#include<string>
#include"esp_wifi.h"usingnamespacestd;#define uS_TO_S_FACTOR 1000000 /* Conversion factor for micro seconds to seconds */
#define TIME_TO_SLEEP 300 /* Time ESP32 will go to sleep (in seconds) */voidwifi_connect(){WiFi.begin("[SSID]","[PASSWORD]");Serial.println("Connecting");while(WiFi.status()!=WL_CONNECTED){delay(500);Serial.print(".");}Serial.println("Connected");}voidsetup(){Serial.begin(115200);while(!Serial);/* ? */Serial.println("Sleep experiment");wifi_connect();}intcounter=0;voidloop(){//Check WiFi connection statusif(WiFi.status()==WL_CONNECTED){HTTPClienthttp;// Your Domain name with URL path or IP address with pathhttp.begin("http://10.1.1.11:4567/log?board=esp32&test=lightsleep");// Send HTTP GET requestinthttpResponseCode=http.GET();if(httpResponseCode==200){Serial.print("Success");}else{Serial.print("Error code: ");Serial.println(httpResponseCode);}// Free resourceshttp.end();// Need to stop wifi before sleeping, then start again.esp_wifi_stop();esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP*uS_TO_S_FACTOR);esp_light_sleep_start();esp_wifi_start();}else{Serial.println("WiFi Disconnected. Attempting to re-connect");wifi_connect();}//delay(300000); /* 5 minutes */}
C
#include<HTTPClient.h>
#include<string>
#include"esp_wifi.h"usingnamespacestd;#define uS_TO_S_FACTOR 1000000 /* Conversion factor for micro seconds to seconds */
#define TIME_TO_SLEEP 300 /* Time ESP32 will go to sleep (in seconds) */voidwifi_connect(){WiFi.begin("[SSID]","[PASSWORD]");Serial.println("Connecting");while(WiFi.status()!=WL_CONNECTED){delay(500);Serial.print(".");}Serial.println("Connected");}voidsetup(){Serial.begin(115200);while(!Serial);/* ? */Serial.println("Sleep experiment");wifi_connect();}intcounter=0;voidloop(){//Check WiFi connection statusif(WiFi.status()==WL_CONNECTED){HTTPClienthttp;// Your Domain name with URL path or IP address with pathhttp.begin("http://10.1.1.11:4567/log?board=esp32&test=lightsleep");// Send HTTP GET requestinthttpResponseCode=http.GET();if(httpResponseCode==200){Serial.print("Success");}else{Serial.print("Error code: ");Serial.println(httpResponseCode);}// Free resourceshttp.end();// Need to stop wifi before sleeping, then start again.esp_wifi_stop();esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP*uS_TO_S_FACTOR);esp_light_sleep_start();esp_wifi_start();}else{Serial.println("WiFi Disconnected. Attempting to re-connect");wifi_connect();}//delay(300000); /* 5 minutes */}
C
#include<HTTPClient.h>
#include<string>
#include"esp_wifi.h"usingnamespacestd;#define uS_TO_S_FACTOR 1000000 /* Conversion factor for micro seconds to seconds */
#define TIME_TO_SLEEP 300 /* Time ESP32 will go to sleep (in seconds) */voidwifi_connect(){WiFi.begin("[SSID]","[PASSWORD]");Serial.println("Connecting");while(WiFi.status()!=WL_CONNECTED){delay(500);Serial.print(".");}Serial.println("Connected");}voidsetup(){Serial.begin(115200);while(!Serial);/* ? */Serial.println("Sleep experiment");wifi_connect();}intcounter=0;voidloop(){//Check WiFi connection statusif(WiFi.status()==WL_CONNECTED){HTTPClienthttp;// Your Domain name with URL path or IP address with pathhttp.begin("http://10.1.1.11:4567/log?board=esp32&test=lightsleep");// Send HTTP GET requestinthttpResponseCode=http.GET();if(httpResponseCode==200){Serial.print("Success");}else{Serial.print("Error code: ");Serial.println(httpResponseCode);}// Free resourceshttp.end();// Need to stop wifi before sleeping, then start again.esp_wifi_stop();esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP*uS_TO_S_FACTOR);esp_light_sleep_start();esp_wifi_start();}else{Serial.println("WiFi Disconnected. Attempting to re-connect");wifi_connect();}//delay(300000); /* 5 minutes */}
C
#include<HTTPClient.h>
#include<string>
#include"esp_wifi.h"usingnamespacestd;#define uS_TO_S_FACTOR 1000000 /* Conversion factor for micro seconds to seconds */
#define TIME_TO_SLEEP 300 /* Time ESP32 will go to sleep (in seconds) */voidwifi_connect(){WiFi.begin("[SSID]","[PASSWORD]");Serial.println("Connecting");while(WiFi.status()!=WL_CONNECTED){delay(500);Serial.print(".");}Serial.println("Connected");}voidsetup(){Serial.begin(115200);while(!Serial);/* ? */Serial.println("Sleep experiment");wifi_connect();}intcounter=0;voidloop(){//Check WiFi connection statusif(WiFi.status()==WL_CONNECTED){HTTPClienthttp;// Your Domain name with URL path or IP address with pathhttp.begin("http://10.1.1.11:4567/log?board=esp32&test=lightsleep");// Send HTTP GET requestinthttpResponseCode=http.GET();if(httpResponseCode==200){Serial.print("Success");}else{Serial.print("Error code: ");Serial.println(httpResponseCode);}// Free resourceshttp.end();// Need to stop wifi before sleeping, then start again.esp_wifi_stop();esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP*uS_TO_S_FACTOR);esp_light_sleep_start();esp_wifi_start();}else{Serial.println("WiFi Disconnected. Attempting to re-connect");wifi_connect();}//delay(300000); /* 5 minutes */}
C
#include<HTTPClient.h>
#include<string>
#include"esp_wifi.h"usingnamespacestd;#define uS_TO_S_FACTOR 1000000 /* Conversion factor for micro seconds to seconds */
#define TIME_TO_SLEEP 300 /* Time ESP32 will go to sleep (in seconds) */voidwifi_connect(){WiFi.begin("[SSID]","[PASSWORD]");Serial.println("Connecting");while(WiFi.status()!=WL_CONNECTED){delay(500);Serial.print(".");}Serial.println("Connected");}voidsetup(){Serial.begin(115200);while(!Serial);/* ? */Serial.println("Sleep experiment");wifi_connect();}intcounter=0;voidloop(){//Check WiFi connection statusif(WiFi.status()==WL_CONNECTED){HTTPClienthttp;// Your Domain name with URL path or IP address with pathhttp.begin("http://10.1.1.11:4567/log?board=esp32&test=lightsleep");// Send HTTP GET requestinthttpResponseCode=http.GET();if(httpResponseCode==200){Serial.print("Success");}else{Serial.print("Error code: ");Serial.println(httpResponseCode);}// Free resourceshttp.end();// Need to stop wifi before sleeping, then start again.esp_wifi_stop();esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP*uS_TO_S_FACTOR);esp_light_sleep_start();esp_wifi_start();}else{Serial.println("WiFi Disconnected. Attempting to re-connect");wifi_connect();}//delay(300000); /* 5 minutes */}
C
#include<HTTPClient.h>
#include<string>
#include"esp_wifi.h"usingnamespacestd;#define uS_TO_S_FACTOR 1000000 /* Conversion factor for micro seconds to seconds */
#define TIME_TO_SLEEP 300 /* Time ESP32 will go to sleep (in seconds) */voidwifi_connect(){WiFi.begin("[SSID]","[PASSWORD]");Serial.println("Connecting");while(WiFi.status()!=WL_CONNECTED){delay(500);Serial.print(".");}Serial.println("Connected");}voidsetup(){Serial.begin(115200);while(!Serial);/* ? */Serial.println("Sleep experiment");wifi_connect();}intcounter=0;voidloop(){//Check WiFi connection statusif(WiFi.status()==WL_CONNECTED){HTTPClienthttp;// Your Domain name with URL path or IP address with pathhttp.begin("http://10.1.1.11:4567/log?board=esp32&test=lightsleep");// Send HTTP GET requestinthttpResponseCode=http.GET();if(httpResponseCode==200){Serial.print("Success");}else{Serial.print("Error code: ");Serial.println(httpResponseCode);}// Free resourceshttp.end();// Need to stop wifi before sleeping, then start again.esp_wifi_stop();esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP*uS_TO_S_FACTOR);esp_light_sleep_start();esp_wifi_start();}else{Serial.println("WiFi Disconnected. Attempting to re-connect");wifi_connect();}//delay(300000); /* 5 minutes */}
C
#include<HTTPClient.h>
#include<string>
#include"esp_wifi.h"usingnamespacestd;#define uS_TO_S_FACTOR 1000000 /* Conversion factor for micro seconds to seconds */
#define TIME_TO_SLEEP 300 /* Time ESP32 will go to sleep (in seconds) */voidwifi_connect(){WiFi.begin("[SSID]","[PASSWORD]");Serial.println("Connecting");while(WiFi.status()!=WL_CONNECTED){delay(500);Serial.print(".");}Serial.println("Connected");}voidsetup(){Serial.begin(115200);while(!Serial);/* ? */Serial.println("Sleep experiment");wifi_connect();}intcounter=0;voidloop(){//Check WiFi connection statusif(WiFi.status()==WL_CONNECTED){HTTPClienthttp;// Your Domain name with URL path or IP address with pathhttp.begin("http://10.1.1.11:4567/log?board=esp32&test=lightsleep");// Send HTTP GET requestinthttpResponseCode=http.GET();if(httpResponseCode==200){Serial.print("Success");}else{Serial.print("Error code: ");Serial.println(httpResponseCode);}// Free resourceshttp.end();// Need to stop wifi before sleeping, then start again.esp_wifi_stop();esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP*uS_TO_S_FACTOR);esp_light_sleep_start();esp_wifi_start();}else{Serial.println("WiFi Disconnected. Attempting to re-connect");wifi_connect();}//delay(300000); /* 5 minutes */}
We need the esp_wifi_stop/start commands otherwise it’s not working;
#define uS_TO_S_FACTOR 1000000 /* Conversion factor for micro seconds to seconds */ #define TIME_TO_SLEEP 300 /* Time ESP32 will go to sleep (in seconds) */
// Need to stop wifi before sleeping, then start again. esp_wifi_stop(); esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP * uS_TO_S_FACTOR); esp_deep_sleep_start(); esp_wifi_start();
} else { Serial.println("WiFi Disconnected. Attempting to re-connect"); wifi_connect(); }
#define uS_TO_S_FACTOR 1000000 /* Conversion factor for micro seconds to seconds */ #define TIME_TO_SLEEP 300 /* Time ESP32 will go to sleep (in seconds) */
// Need to stop wifi before sleeping, then start again. esp_wifi_stop(); esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP * uS_TO_S_FACTOR); esp_deep_sleep_start(); esp_wifi_start();
} else { Serial.println("WiFi Disconnected. Attempting to re-connect"); wifi_connect(); }
#define uS_TO_S_FACTOR 1000000 /* Conversion factor for micro seconds to seconds */ #define TIME_TO_SLEEP 300 /* Time ESP32 will go to sleep (in seconds) */
// Need to stop wifi before sleeping, then start again. esp_wifi_stop(); esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP * uS_TO_S_FACTOR); esp_deep_sleep_start(); esp_wifi_start();
} else { Serial.println("WiFi Disconnected. Attempting to re-connect"); wifi_connect(); }
#define uS_TO_S_FACTOR 1000000 /* Conversion factor for micro seconds to seconds */ #define TIME_TO_SLEEP 300 /* Time ESP32 will go to sleep (in seconds) */
// Need to stop wifi before sleeping, then start again. esp_wifi_stop(); esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP * uS_TO_S_FACTOR); esp_deep_sleep_start(); esp_wifi_start();
} else { Serial.println("WiFi Disconnected. Attempting to re-connect"); wifi_connect(); }
#define uS_TO_S_FACTOR 1000000 /* Conversion factor for micro seconds to seconds */ #define TIME_TO_SLEEP 300 /* Time ESP32 will go to sleep (in seconds) */
// Need to stop wifi before sleeping, then start again. esp_wifi_stop(); esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP * uS_TO_S_FACTOR); esp_deep_sleep_start(); esp_wifi_start();
} else { Serial.println("WiFi Disconnected. Attempting to re-connect"); wifi_connect(); }
//delay(300000); /* 5 minutes */ }
CPP
#include<HTTPClient.h>
#include<string>
#include"esp_wifi.h"usingnamespacestd;#define uS_TO_S_FACTOR 1000000 /* Conversion factor for micro seconds to seconds */
#define TIME_TO_SLEEP 300 /* Time ESP32 will go to sleep (in seconds) */voidwifi_connect(){WiFi.begin("[SSID]","[PASSWORD]");Serial.println("Connecting");while(WiFi.status()!=WL_CONNECTED){delay(500);Serial.print(".");}Serial.println("Connected");}voidsetup(){Serial.begin(115200);while(!Serial);/* ? */Serial.println("Sleep experiment");wifi_connect();}intcounter=0;voidloop(){//Check WiFi connection statusif(WiFi.status()==WL_CONNECTED){HTTPClienthttp;// Your Domain name with URL path or IP address with pathhttp.begin("http://10.1.1.11:4567/log?board=esp32&test=deepsleep");// Send HTTP GET requestinthttpResponseCode=http.GET();if(httpResponseCode==200){Serial.print("Success");}else{Serial.print("Error code: ");Serial.println(httpResponseCode);}// Free resourceshttp.end();// Need to stop wifi before sleeping, then start again.esp_wifi_stop();esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP*uS_TO_S_FACTOR);esp_deep_sleep_start();esp_wifi_start();}else{Serial.println("WiFi Disconnected. Attempting to re-connect");wifi_connect();}//delay(300000); /* 5 minutes */}
C
#include<HTTPClient.h>
#include<string>
#include"esp_wifi.h"usingnamespacestd;#define uS_TO_S_FACTOR 1000000 /* Conversion factor for micro seconds to seconds */
#define TIME_TO_SLEEP 300 /* Time ESP32 will go to sleep (in seconds) */voidwifi_connect(){WiFi.begin("[SSID]","[PASSWORD]");Serial.println("Connecting");while(WiFi.status()!=WL_CONNECTED){delay(500);Serial.print(".");}Serial.println("Connected");}voidsetup(){Serial.begin(115200);while(!Serial);/* ? */Serial.println("Sleep experiment");wifi_connect();}intcounter=0;voidloop(){//Check WiFi connection statusif(WiFi.status()==WL_CONNECTED){HTTPClienthttp;// Your Domain name with URL path or IP address with pathhttp.begin("http://10.1.1.11:4567/log?board=esp32&test=deepsleep");// Send HTTP GET requestinthttpResponseCode=http.GET();if(httpResponseCode==200){Serial.print("Success");}else{Serial.print("Error code: ");Serial.println(httpResponseCode);}// Free resourceshttp.end();// Need to stop wifi before sleeping, then start again.esp_wifi_stop();esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP*uS_TO_S_FACTOR);esp_deep_sleep_start();esp_wifi_start();}else{Serial.println("WiFi Disconnected. Attempting to re-connect");wifi_connect();}//delay(300000); /* 5 minutes */}
C
#include<HTTPClient.h>
#include<string>
#include"esp_wifi.h"usingnamespacestd;#define uS_TO_S_FACTOR 1000000 /* Conversion factor for micro seconds to seconds */
#define TIME_TO_SLEEP 300 /* Time ESP32 will go to sleep (in seconds) */voidwifi_connect(){WiFi.begin("[SSID]","[PASSWORD]");Serial.println("Connecting");while(WiFi.status()!=WL_CONNECTED){delay(500);Serial.print(".");}Serial.println("Connected");}voidsetup(){Serial.begin(115200);while(!Serial);/* ? */Serial.println("Sleep experiment");wifi_connect();}intcounter=0;voidloop(){//Check WiFi connection statusif(WiFi.status()==WL_CONNECTED){HTTPClienthttp;// Your Domain name with URL path or IP address with pathhttp.begin("http://10.1.1.11:4567/log?board=esp32&test=deepsleep");// Send HTTP GET requestinthttpResponseCode=http.GET();if(httpResponseCode==200){Serial.print("Success");}else{Serial.print("Error code: ");Serial.println(httpResponseCode);}// Free resourceshttp.end();// Need to stop wifi before sleeping, then start again.esp_wifi_stop();esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP*uS_TO_S_FACTOR);esp_deep_sleep_start();esp_wifi_start();}else{Serial.println("WiFi Disconnected. Attempting to re-connect");wifi_connect();}//delay(300000); /* 5 minutes */}
C
#include<HTTPClient.h>
#include<string>
#include"esp_wifi.h"usingnamespacestd;#define uS_TO_S_FACTOR 1000000 /* Conversion factor for micro seconds to seconds */
#define TIME_TO_SLEEP 300 /* Time ESP32 will go to sleep (in seconds) */voidwifi_connect(){WiFi.begin("[SSID]","[PASSWORD]");Serial.println("Connecting");while(WiFi.status()!=WL_CONNECTED){delay(500);Serial.print(".");}Serial.println("Connected");}voidsetup(){Serial.begin(115200);while(!Serial);/* ? */Serial.println("Sleep experiment");wifi_connect();}intcounter=0;voidloop(){//Check WiFi connection statusif(WiFi.status()==WL_CONNECTED){HTTPClienthttp;// Your Domain name with URL path or IP address with pathhttp.begin("http://10.1.1.11:4567/log?board=esp32&test=deepsleep");// Send HTTP GET requestinthttpResponseCode=http.GET();if(httpResponseCode==200){Serial.print("Success");}else{Serial.print("Error code: ");Serial.println(httpResponseCode);}// Free resourceshttp.end();// Need to stop wifi before sleeping, then start again.esp_wifi_stop();esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP*uS_TO_S_FACTOR);esp_deep_sleep_start();esp_wifi_start();}else{Serial.println("WiFi Disconnected. Attempting to re-connect");wifi_connect();}//delay(300000); /* 5 minutes */}
C
#include<HTTPClient.h>
#include<string>
#include"esp_wifi.h"usingnamespacestd;#define uS_TO_S_FACTOR 1000000 /* Conversion factor for micro seconds to seconds */
#define TIME_TO_SLEEP 300 /* Time ESP32 will go to sleep (in seconds) */voidwifi_connect(){WiFi.begin("[SSID]","[PASSWORD]");Serial.println("Connecting");while(WiFi.status()!=WL_CONNECTED){delay(500);Serial.print(".");}Serial.println("Connected");}voidsetup(){Serial.begin(115200);while(!Serial);/* ? */Serial.println("Sleep experiment");wifi_connect();}intcounter=0;voidloop(){//Check WiFi connection statusif(WiFi.status()==WL_CONNECTED){HTTPClienthttp;// Your Domain name with URL path or IP address with pathhttp.begin("http://10.1.1.11:4567/log?board=esp32&test=deepsleep");// Send HTTP GET requestinthttpResponseCode=http.GET();if(httpResponseCode==200){Serial.print("Success");}else{Serial.print("Error code: ");Serial.println(httpResponseCode);}// Free resourceshttp.end();// Need to stop wifi before sleeping, then start again.esp_wifi_stop();esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP*uS_TO_S_FACTOR);esp_deep_sleep_start();esp_wifi_start();}else{Serial.println("WiFi Disconnected. Attempting to re-connect");wifi_connect();}//delay(300000); /* 5 minutes */}
C
#include<HTTPClient.h>
#include<string>
#include"esp_wifi.h"usingnamespacestd;#define uS_TO_S_FACTOR 1000000 /* Conversion factor for micro seconds to seconds */
#define TIME_TO_SLEEP 300 /* Time ESP32 will go to sleep (in seconds) */voidwifi_connect(){WiFi.begin("[SSID]","[PASSWORD]");Serial.println("Connecting");while(WiFi.status()!=WL_CONNECTED){delay(500);Serial.print(".");}Serial.println("Connected");}voidsetup(){Serial.begin(115200);while(!Serial);/* ? */Serial.println("Sleep experiment");wifi_connect();}intcounter=0;voidloop(){//Check WiFi connection statusif(WiFi.status()==WL_CONNECTED){HTTPClienthttp;// Your Domain name with URL path or IP address with pathhttp.begin("http://10.1.1.11:4567/log?board=esp32&test=deepsleep");// Send HTTP GET requestinthttpResponseCode=http.GET();if(httpResponseCode==200){Serial.print("Success");}else{Serial.print("Error code: ");Serial.println(httpResponseCode);}// Free resourceshttp.end();// Need to stop wifi before sleeping, then start again.esp_wifi_stop();esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP*uS_TO_S_FACTOR);esp_deep_sleep_start();esp_wifi_start();}else{Serial.println("WiFi Disconnected. Attempting to re-connect");wifi_connect();}//delay(300000); /* 5 minutes */}
C
#include<HTTPClient.h>
#include<string>
#include"esp_wifi.h"usingnamespacestd;#define uS_TO_S_FACTOR 1000000 /* Conversion factor for micro seconds to seconds */
#define TIME_TO_SLEEP 300 /* Time ESP32 will go to sleep (in seconds) */voidwifi_connect(){WiFi.begin("[SSID]","[PASSWORD]");Serial.println("Connecting");while(WiFi.status()!=WL_CONNECTED){delay(500);Serial.print(".");}Serial.println("Connected");}voidsetup(){Serial.begin(115200);while(!Serial);/* ? */Serial.println("Sleep experiment");wifi_connect();}intcounter=0;voidloop(){//Check WiFi connection statusif(WiFi.status()==WL_CONNECTED){HTTPClienthttp;// Your Domain name with URL path or IP address with pathhttp.begin("http://10.1.1.11:4567/log?board=esp32&test=deepsleep");// Send HTTP GET requestinthttpResponseCode=http.GET();if(httpResponseCode==200){Serial.print("Success");}else{Serial.print("Error code: ");Serial.println(httpResponseCode);}// Free resourceshttp.end();// Need to stop wifi before sleeping, then start again.esp_wifi_stop();esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP*uS_TO_S_FACTOR);esp_deep_sleep_start();esp_wifi_start();}else{Serial.println("WiFi Disconnected. Attempting to re-connect");wifi_connect();}//delay(300000); /* 5 minutes */}
C
#include<HTTPClient.h>
#include<string>
#include"esp_wifi.h"usingnamespacestd;#define uS_TO_S_FACTOR 1000000 /* Conversion factor for micro seconds to seconds */
#define TIME_TO_SLEEP 300 /* Time ESP32 will go to sleep (in seconds) */voidwifi_connect(){WiFi.begin("[SSID]","[PASSWORD]");Serial.println("Connecting");while(WiFi.status()!=WL_CONNECTED){delay(500);Serial.print(".");}Serial.println("Connected");}voidsetup(){Serial.begin(115200);while(!Serial);/* ? */Serial.println("Sleep experiment");wifi_connect();}intcounter=0;voidloop(){//Check WiFi connection statusif(WiFi.status()==WL_CONNECTED){HTTPClienthttp;// Your Domain name with URL path or IP address with pathhttp.begin("http://10.1.1.11:4567/log?board=esp32&test=deepsleep");// Send HTTP GET requestinthttpResponseCode=http.GET();if(httpResponseCode==200){Serial.print("Success");}else{Serial.print("Error code: ");Serial.println(httpResponseCode);}// Free resourceshttp.end();// Need to stop wifi before sleeping, then start again.esp_wifi_stop();esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP*uS_TO_S_FACTOR);esp_deep_sleep_start();esp_wifi_start();}else{Serial.println("WiFi Disconnected. Attempting to re-connect");wifi_connect();}//delay(300000); /* 5 minutes */}
C
#include<HTTPClient.h>
#include<string>
#include"esp_wifi.h"usingnamespacestd;#define uS_TO_S_FACTOR 1000000 /* Conversion factor for micro seconds to seconds */
#define TIME_TO_SLEEP 300 /* Time ESP32 will go to sleep (in seconds) */voidwifi_connect(){WiFi.begin("[SSID]","[PASSWORD]");Serial.println("Connecting");while(WiFi.status()!=WL_CONNECTED){delay(500);Serial.print(".");}Serial.println("Connected");}voidsetup(){Serial.begin(115200);while(!Serial);/* ? */Serial.println("Sleep experiment");wifi_connect();}intcounter=0;voidloop(){//Check WiFi connection statusif(WiFi.status()==WL_CONNECTED){HTTPClienthttp;// Your Domain name with URL path or IP address with pathhttp.begin("http://10.1.1.11:4567/log?board=esp32&test=deepsleep");// Send HTTP GET requestinthttpResponseCode=http.GET();if(httpResponseCode==200){Serial.print("Success");}else{Serial.print("Error code: ");Serial.println(httpResponseCode);}// Free resourceshttp.end();// Need to stop wifi before sleeping, then start again.esp_wifi_stop();esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP*uS_TO_S_FACTOR);esp_deep_sleep_start();esp_wifi_start();}else{Serial.println("WiFi Disconnected. Attempting to re-connect");wifi_connect();}//delay(300000); /* 5 minutes */}
C
#include<HTTPClient.h>
#include<string>
#include"esp_wifi.h"usingnamespacestd;#define uS_TO_S_FACTOR 1000000 /* Conversion factor for micro seconds to seconds */
#define TIME_TO_SLEEP 300 /* Time ESP32 will go to sleep (in seconds) */voidwifi_connect(){WiFi.begin("[SSID]","[PASSWORD]");Serial.println("Connecting");while(WiFi.status()!=WL_CONNECTED){delay(500);Serial.print(".");}Serial.println("Connected");}voidsetup(){Serial.begin(115200);while(!Serial);/* ? */Serial.println("Sleep experiment");wifi_connect();}intcounter=0;voidloop(){//Check WiFi connection statusif(WiFi.status()==WL_CONNECTED){HTTPClienthttp;// Your Domain name with URL path or IP address with pathhttp.begin("http://10.1.1.11:4567/log?board=esp32&test=deepsleep");// Send HTTP GET requestinthttpResponseCode=http.GET();if(httpResponseCode==200){Serial.print("Success");}else{Serial.print("Error code: ");Serial.println(httpResponseCode);}// Free resourceshttp.end();// Need to stop wifi before sleeping, then start again.esp_wifi_stop();esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP*uS_TO_S_FACTOR);esp_deep_sleep_start();esp_wifi_start();}else{Serial.println("WiFi Disconnected. Attempting to re-connect");wifi_connect();}//delay(300000); /* 5 minutes */}
C
#include<HTTPClient.h>
#include<string>
#include"esp_wifi.h"usingnamespacestd;#define uS_TO_S_FACTOR 1000000 /* Conversion factor for micro seconds to seconds */
#define TIME_TO_SLEEP 300 /* Time ESP32 will go to sleep (in seconds) */voidwifi_connect(){WiFi.begin("[SSID]","[PASSWORD]");Serial.println("Connecting");while(WiFi.status()!=WL_CONNECTED){delay(500);Serial.print(".");}Serial.println("Connected");}voidsetup(){Serial.begin(115200);while(!Serial);/* ? */Serial.println("Sleep experiment");wifi_connect();}intcounter=0;voidloop(){//Check WiFi connection statusif(WiFi.status()==WL_CONNECTED){HTTPClienthttp;// Your Domain name with URL path or IP address with pathhttp.begin("http://10.1.1.11:4567/log?board=esp32&test=deepsleep");// Send HTTP GET requestinthttpResponseCode=http.GET();if(httpResponseCode==200){Serial.print("Success");}else{Serial.print("Error code: ");Serial.println(httpResponseCode);}// Free resourceshttp.end();// Need to stop wifi before sleeping, then start again.esp_wifi_stop();esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP*uS_TO_S_FACTOR);esp_deep_sleep_start();esp_wifi_start();}else{Serial.println("WiFi Disconnected. Attempting to re-connect");wifi_connect();}//delay(300000); /* 5 minutes */}
From lightsleep to deepsleep the only line I changed is this;From lightsleep to deepsleep the only line I changed is this;From lightsleep to deepsleep the only line I changed is this;From lightsleep to deepsleep the only line I changed is this;From lightsleep to deepsleep the only line I changed is this;From lightsleep to deepsleep the only line I changed is this;From lightsleep to deepsleep the only line I changed is this;From lightsleep to deepsleep the only line I changed is this;From lightsleep to deepsleep the only line I changed is this;
C
esp_deep_sleep_start();
Experiment #5: Hibernation
Results
Board
Experiment
Complexity x/5
WIFI Post
Time
esp32
No sleep
0
5min
38hrs
esp32
Modem sleep
esp32
lightsleep
esp32
deepsleep
esp32
hibernation
pico
No sleep
pico
Modem sleep
pico
lightsleep
pico
deepsleep
pico
hibernation
pico2
No sleep
pico2
Modem sleep
pico2
lightsleep
pico2
deepsleep
pico2
hibernation
Board
Experiment
Complexity x/5
WIFI Post
Time
esp32
No sleep
0
5min
38hrs
esp32
Modem sleep
esp32
lightsleep
esp32
deepsleep
esp32
hibernation
pico
No sleep
pico
Modem sleep
pico
lightsleep
pico
deepsleep
pico
hibernation
pico2
No sleep
pico2
Modem sleep
pico2
lightsleep
pico2
deepsleep
pico2
hibernation
Board
Experiment
Complexity x/5
WIFI Post
Time
esp32
No sleep
0
5min
38hrs
esp32
Modem sleep
esp32
lightsleep
esp32
deepsleep
esp32
hibernation
pico
No sleep
pico
Modem sleep
pico
lightsleep
pico
deepsleep
pico
hibernation
pico2
No sleep
pico2
Modem sleep
pico2
lightsleep
pico2
deepsleep
pico2
hibernation
Board
Experiment
Complexity x/5
WIFI Post
Time
esp32
No sleep
0
5min
38hrs
esp32
Modem sleep
esp32
lightsleep
esp32
deepsleep
esp32
hibernation
pico
No sleep
pico
Modem sleep
pico
lightsleep
pico
deepsleep
pico
hibernation
pico2
No sleep
pico2
Modem sleep
pico2
lightsleep
pico2
deepsleep
pico2
hibernation
Board
Experiment
Complexity x/5
WIFI Post
Time
esp32
No sleep
0
5min
38hrs
esp32
Modem sleep
esp32
lightsleep
esp32
deepsleep
esp32
hibernation
pico
No sleep
pico
Modem sleep
pico
lightsleep
pico
deepsleep
pico
hibernation
pico2
No sleep
pico2
Modem sleep
pico2
lightsleep
pico2
deepsleep
pico2
hibernation
Board
Experiment
Complexity x/5
WIFI Post
Time
esp32
No sleep
0
5min
38hrs
esp32
Modem sleep
esp32
lightsleep
esp32
deepsleep
esp32
hibernation
pico
No sleep
pico
Modem sleep
pico
lightsleep
pico
deepsleep
pico
hibernation
pico2
No sleep
pico2
Modem sleep
pico2
lightsleep
pico2
deepsleep
pico2
hibernation
Board
Experiment
Complexity x/5
WIFI Post
Time
esp32
No sleep
0
5min
38hrs
esp32
Modem sleep
esp32
lightsleep
esp32
deepsleep
esp32
hibernation
pico
No sleep
pico
Modem sleep
pico
lightsleep
pico
deepsleep
pico
hibernation
pico2
No sleep
pico2
Modem sleep
pico2
lightsleep
pico2
deepsleep
pico2
hibernation
Board
Experiment
Complexity x/5
WIFI Post
Time
esp32
No sleep
0
5min
38hrs
esp32
Modem sleep
esp32
lightsleep
esp32
deepsleep
esp32
hibernation
pico
No sleep
pico
Modem sleep
pico
lightsleep
pico
deepsleep
pico
hibernation
pico2
No sleep
pico2
Modem sleep
pico2
lightsleep
pico2
deepsleep
pico2
hibernation
Board
Experiment
Complexity x/5
WIFI Post
Time
esp32
No sleep
0
5min
38hrs
esp32
Modem sleep
esp32
lightsleep
esp32
deepsleep
esp32
hibernation
pico
No sleep
pico
Modem sleep
pico
lightsleep
pico
deepsleep
pico
hibernation
pico2
No sleep
pico2
Modem sleep
pico2
lightsleep
pico2
deepsleep
pico2
hibernation
Board
Experiment
Complexity x/5
WIFI Post
Time
esp32
No sleep
0
5min
38hrs
esp32
Modem sleep
esp32
lightsleep
esp32
deepsleep
esp32
hibernation
pico
No sleep
pico
Modem sleep
pico
lightsleep
pico
deepsleep
pico
hibernation
pico2
No sleep
pico2
Modem sleep
pico2
lightsleep
pico2
deepsleep
pico2
hibernation
Board
Experiment
Complexity x/5
WIFI Post
Time
esp32
No sleep
0
5min
38hrs
esp32
Modem sleep
esp32
lightsleep
esp32
deepsleep
esp32
hibernation
pico
No sleep
pico
Modem sleep
pico
lightsleep
pico
deepsleep
pico
hibernation
pico2
No sleep
pico2
Modem sleep
pico2
lightsleep
pico2
deepsleep
pico2
hibernation
Board
Experiment
Complexity x/5
WIFI Post
Time
esp32
No sleep
0
5min
38hrs
esp32
Modem sleep
esp32
lightsleep
esp32
deepsleep
esp32
hibernation
pico
No sleep
pico
Modem sleep
pico
lightsleep
pico
deepsleep
pico
hibernation
pico2
No sleep
pico2
Modem sleep
pico2
lightsleep
pico2
deepsleep
pico2
hibernation
Board
Experiment
Complexity x/5
WIFI Post
Time
esp32
No sleep
0
5min
38hrs
esp32
Modem sleep
esp32
lightsleep
esp32
deepsleep
esp32
hibernation
pico
No sleep
pico
Modem sleep
pico
lightsleep
pico
deepsleep
pico
hibernation
pico2
No sleep
pico2
Modem sleep
pico2
lightsleep
pico2
deepsleep
pico2
hibernation
Board
Experiment
Complexity x/5
WIFI Post
Time
esp32
No sleep
0
5min
38hrs
esp32
Modem sleep
esp32
lightsleep
esp32
deepsleep
esp32
hibernation
pico
No sleep
pico
Modem sleep
pico
lightsleep
pico
deepsleep
pico
hibernation
pico2
No sleep
pico2
Modem sleep
pico2
lightsleep
pico2
deepsleep
pico2
hibernation
Board
Experiment
Complexity x/5
WIFI Post
Time
esp32
No sleep
0
5min
38hrs
esp32
Modem sleep
esp32
lightsleep
esp32
deepsleep
esp32
hibernation
pico
No sleep
pico
Modem sleep
pico
lightsleep
pico
deepsleep
pico
hibernation
pico2
No sleep
pico2
Modem sleep
pico2
lightsleep
pico2
deepsleep
pico2
hibernation
Board
Experiment
Complexity x/5
WIFI Post
Time
esp32
No sleep
0
5min
38hrs
esp32
Modem sleep
esp32
lightsleep
esp32
deepsleep
esp32
hibernation
pico
No sleep
pico
Modem sleep
pico
lightsleep
pico
deepsleep
pico
hibernation
pico2
No sleep
pico2
Modem sleep
pico2
lightsleep
pico2
deepsleep
pico2
hibernation
Later (with Solar)Later (with Solar)Later (with Solar)
Gallery
"Batteries" by en:User:Brianiac licensed under PUBLIC DOMAIN.