- Tue Nov 11, 2014 1:51 am
#2459
I dont use timer. I loked your code and your chip not sleeping. Just waiting. If you want to use sleep and save batery you must connect gpio16 to the rst pin and use this code.(change your last part on your code)
Code: Select allvoid ICACHE_FLASH_ATTR user_init(void)
{
os_printf("\r\nGet this sucker going!\r\n");
//Set GPIO2 to output mode
PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO2_U, FUNC_GPIO2);
PIN_PULLUP_EN(PERIPHS_IO_MUX_GPIO2_U);
wifi_get_macaddr(0, hwaddr);
readDht();
system_deep_sleep(5*60*1000*1000);
}
And i have question dor you. You are connecting in local pc with tcp connection right? How can i send data on the website and you are using dht22, how can i read ds18b20 or dht11 data?
fasmide wrote:So for clearification, your pulling the connection up, to wake the device from sleep before the xyz minuttes you've set the timer?
ESP8266.com Moderator
Lets get the party started and +1
[url=https://www.banggood.com/custlink/KvGGhGF4wG[/url]
I like ESP8266 and ESP8285 and ESP32