Placing a delay within any built-in function pertaining to the wireless radio will only halt operations on the Wi-Fi core or core0. Your main loop code wont be affected by a delay placed in core0. It will only halt wireless operations.
I ran into a similar issue and it took a while for me to put it together. I use global variables when passing info between core0 and core1.
- Wireless runs on
core0and - Your main code runs on
core1(unless otherwise specified in the setup).
Delay function not working with ESP32 - Arduino Stack Exchange
ESP32 delay() doesn't work
Use timer with callback or just use a delay loop?
delay() function doesn't work for less than 10ms
Videos
I am reading BME280 values every 5 minutes and publishing to my MQTT broker. Currently this simple code uses vTaskDelay to wait for 5 minutes, then do the tasks. This is fine but seems so inelegant.
I can instead use esp_timer_start_periodic with a callback function. I guess this is better if I want to use ESP32 sleep functionality (not currently planning to use).
I'm just seeking opinions on this. Thanks.