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).
Arduino Forum
forum.arduino.cc › projects › programming
ESP32-core in which file is delay() declared? - Programming - Arduino Forum
May 14, 2023 - Hi Everybody, I'm interested in the ESP32-core what are the lines of code for function delay() inside the core for ESP32 So I tried a find-text in files search in the path C:\Users\dipl-\AppData\Local\Arduino15\packages\esp32 but with no success. As the function delay() can be used in ESP32-code it must be defined / declared somewhere How would you start searching for it? extension filter *.cpp? what folder-paths? is this so special that it is just a precompiled hex-file whcih means I c...
RNT Lab
rntlab.com › question › esp32-replacement-for-arduino-delay
ESP32 replacement for Arduino "delay()" ??
When it get’s a request it checks what it’s for and sends the response. Most of the time it’s idling so you can do a lot. Also remember that the ESP32 has two cores so you can set one to handle HTTP requests and the other to handle everything else. ... Hi Steve, Thanks.. I am looking at NOT using regular delay()..
ESP32 delay required after Serial.begin
I'm still using Arduino IDE 1.8.9 and the esp32 Boards extension (by espressif Version 3.3.0) with an ESP WROOM 32 module. A small test sketch with nothing but void setup() and some Serial output does not work, unless I add some delay between Serial.begin and the first Serial output. More on forum.arduino.cc
PSA: Arduino with Single Core ESP32s adds 5ms delay to loop() every 2 Seconds
Don't know exactly where that is, but I'm pretty sure that is needed to allow other tasks to run. Without any delay the watchdog will kill the process. I recently tried using the second esp32-core, and that was my first gotcha. More on reddit.com
Delay function not working with ESP32 - Arduino Stack Exchange
For whatever reason the delay function is not working (it is not delaying at all) with my ESP32 development board. Has anyone come across a similar issue before? It's not working with other sketche... More on arduino.stackexchange.com
delay() with small values (e.g. delay(5)) does not delay if system HZ (CONFIG_FREERTOS_HZ) <1000
Board OLIMEX ESP32-POE (but will happen anywhere I think) Device Description Stock OLIMEX ESP32-POE, but I believe this will happen on any board Hardware Configuration Nothing attached Version late... More on github.com
Arduino Forum
forum.arduino.cc › projects › programming
ESP32 delay() doesn't work - Programming - Arduino Forum
November 18, 2022 - Hi all, I am using ESP32 to do a project by using delay() function. It seems to me that the delay() function never works! I tried using the millis() as well and it doesn't work so well neither. unsigned long ini= 0 ; void setup() { Serial.begin(115200); delay(10); wifisecure.setInsecure(); while (status != WL_CONNECTED) { Serial.print("Attempting to connect to SSID: "); Serial.println(ssid); // Connect to WPA/WPA2 network.
Arduino Forum
forum.arduino.cc › projects › programming
ESP32 delay required after Serial.begin - Programming - Arduino Forum
August 1, 2025 - I'm still using Arduino IDE 1.8.9 and the esp32 Boards extension (by espressif Version 3.3.0) with an ESP WROOM 32 module. A small test sketch with nothing but void setup() and some Serial output does not work, unless I add some delay between Serial.begin and the first Serial output.
Mechatronics LAB
mechatronicslab.net › home › lessons › esp32 arduino programming handbook › chapter 12: timers, delays & interrupts › delay() function for esp32 arduino programming
Delay() Function for ESP32 Arduino Programming - Mechatronics LAB
What Is delay() and Why Use It? The delay() function tells your ESP32 to “wait” before running the next line of code. One millisecond equals one-thousandth of a second. For example, delay(1000) makes the ESP32 pause for one second.
ESP32 Forum
esp32.com › board index › english forum › discussion forum › esp32 arduino
vTaskDelay() vS. Delay() - ESP32 Forum
Delay is an arduino function wrapper that calls vtaskdelay. You should use it if you are using arduino, and also you should post in the arduino forum. https://esp32.com/viewtopic.php?f=2&t=2377 A tick is what you configure it to be.
Random Nerd Tutorials
randomnerdtutorials.com › home › arduino › theory and blog › why you shouldn’t always use the arduino delay function
Why You Shouldn’t Always Use the Arduino Delay Function | Random Nerd Tutorials
April 2, 2019 - Using the millis() functions takes a little of extra work when compared to using delay(). But your programs can’t do multitasking on the Arduino without it. Share this post with a friend that also likes electronics! You can contact me by leaving a comment. If you like this post probably you might like my next ones, so please support me by subscribing my blog and my Facebook Page. ... Learn how to build a home automation system and we’ll cover the following main subjects: Node-RED, Node-RED Dashboard, Raspberry Pi, ESP32, ESP8266, MQTT, and InfluxDB database DOWNLOAD »
GitHub
github.com › arduino › nina-fw › blob › master › arduino › cores › esp32 › delay.h
nina-fw/arduino/cores/esp32/delay.h at master · arduino/nina-fw
Firmware for u-blox NINA W102 WiFi/BT module. Contribute to arduino/nina-fw development by creating an account on GitHub.
Author arduino
GitHub
github.com › espressif › arduino-esp32 › issues › 6946
delay() with small values (e.g. delay(5)) does not delay if system HZ (CONFIG_FREERTOS_HZ) <1000 · Issue #6946 · espressif/arduino-esp32
July 5, 2022 - If portTICK_PERIOD_MS > 1 (i.e. CONFIG_FREERTOS_HZ < 1000), then small values will round down to 0, and no delay will happen.
Author espressif
Reddit
reddit.com › r/arduino › sub microsecond delays on esp32
r/arduino on Reddit: Sub microsecond delays on esp32
December 18, 2021 -
Do I have to write instructions in assembly? Im using Arduino IDE and im trying to sample a signal at 44.1khz. I come from a PIC Micro background where I would just use a TMR. Whats the play here in Arduino Land?
Top answer 1 of 2
2
I have several ESP's and haven't used them due to my confusion about Timer hardware. I would want a Timer Interrupt for the task you describe. This discussion on sub-microsecond ESP timing seems well worth reading FYI If ESP Timers prove problematic, then I like your assembler-delay idea. It should be something you could tweak for the desired result -- if you have a way to write and load assembler to the ESP. hth, gl
2 of 2
2
Hmm I just did a search for "ESP32 asm code blocks" hoping that youmight be able to just place an __asm { blah } code block in the C/C++ but did not find it. But I did see people saying that just finding good docs on the assembly instructions themselves was difficult. One person I saw in this thread did have an Arduino project using asm for the Xtensa but it looks like it's less than straightforward. Most optimized C is hard to optimize much further without really knowing the ins and outs of the instructions, which seems difficult to ascertain? ripred edit: This guy has some serious digital audio chops and has created some seriously cool walkie talkies just out of ESP32's and I think making use of DMA. I just looked at it and I know he is getting 44kHz mono for his SD card audio recorder . I wouldn't be surprised if he's improved it to stereo. That might be close to what you're looking for?
GitHub
github.com › espressif › arduino-esp32 › issues › 2981
delay() function doesn't work for less than 10ms · Issue #2981 · espressif/arduino-esp32
July 11, 2019 - Current code is: void delay(uint32_t ms) { vTaskDelay(ms / portTICK_PERIOD_MS); } // My suggestion is: void delay(uint32_t ms) { uint32_t delay_end = millis() + ms; vTaskDelay(ms / portTICK_PERIOD_MS); while (delay_end > millis()) { NOP(); } }
Author espressif
GitHub
github.com › espressif › arduino-esp32 › issues › 2211
Delay(x) delays 3 times more than expected while running esp32 at 80MHz clock speed · Issue #2211 · espressif/arduino-esp32
December 18, 2018 - espressif / arduino-esp32 Public ... link · New issueCopy link · Closed · Closed · Delay(x) delays 3 times more than expected while running esp32 at 80MHz clock speed#2211 ·...
Author espressif
Arduino Forum
forum.arduino.cc › projects › programming
ESP32, serial and delay - Programming - Arduino Forum
September 6, 2020 - Hello, I need to copy serial data as soon each caracter arrives. I have much troubles with latencies during reads and writes. Here is my sketch... pretty simple. I've just added IO output to monitor read/write operations with a logic analyzer. HardwareSerial hwSerCntrlToLcd(1); #define SERIAL_CNTRL_TO_LCD_RXPIN 34 #define SERIAL_CNTRL_TO_LCD_TXPIN 13 #define PIN_READ_FLAG 33 #define PIN_WRITE_FLAG 32 #define BAUD_RATE 1200 ////// Setup void setup() { hwSerCntrlToLcd.begin(BAUD_RATE, S...
Arduino Forum
forum.arduino.cc › projects › networking, protocols, and devices
ESP32 transmit delay and cluster of packets - Networking, Protocols, and Devices - Arduino Forum
April 14, 2022 - Hello, I'm trying to send a simple message every 70ms from an ESP32 device configured in softAP mode to move a servo. However, on the receiver side, 3 messages arrive together and then a 200ms delay. This is more noticeable when a second client connects to the softAP.
DeepBlue
deepbluembedded.com › home › blog › arduino delay() function tutorial
Arduino delay() Function Tutorial
July 26, 2025 - STM32 ESP32 ARDUINO PIC Electronics · July 26, 2025April 23, 2023 by Khaled Magdy · In this tutorial, you’ll learn how to use the Arduino delay function to add a time delay between events in your Arduino projects. We’ll also discuss some variants of Arduino delay to achieve a time delay of (microsecond, millisecond, second, and 1 minute).
Arduino Forum
forum.arduino.cc › other hardware › 3rd party boards
Time delay computation ESP32 - 3rd Party Boards - Arduino Forum
December 9, 2024 - Good afternoon to everybody! I'm very sorry if I bother you with this question but I'm struggling on it since so long! I have an ESP32 and I'm using FreeRTOS to acquire 6 signals. I use Core0 to acquire the data and Core1 to send them to the Python GUI. So far, all good and it works very well!