How to Wait before connect to Wifi, without triggering WDT
Posted: Sun Mar 04, 2018 1:09 pm
Hi Community!
I'm new to native development in ESP8266, I'm using ESP-Open-SDK and ESP-Open-RTOS.
My problem: I need to wait about 1 min before connect to Wi-Fi and start producing sensor data, this is because I have some HW that needs to initialize.
What is the suggested way to achieve this initial delay without triggering the WDT and go into an infinite reboot loop?
I would like to put the delay in to user_init(void) before any call to start Wi-Fi.
Pseudocode:
void user_init(void) {
uart_set_baud(0, 115200);
wait_for_hw() //wait X ms or maybe wait for a GPIO);
wifi__init(); <- will init other tasks on connection ready
gpio_init();
}
I'm new to native development in ESP8266, I'm using ESP-Open-SDK and ESP-Open-RTOS.
My problem: I need to wait about 1 min before connect to Wi-Fi and start producing sensor data, this is because I have some HW that needs to initialize.
What is the suggested way to achieve this initial delay without triggering the WDT and go into an infinite reboot loop?
I would like to put the delay in to user_init(void) before any call to start Wi-Fi.
Pseudocode:
void user_init(void) {
uart_set_baud(0, 115200);
wait_for_hw() //wait X ms or maybe wait for a GPIO);
wifi__init(); <- will init other tasks on connection ready
gpio_init();
}