Today we'll double the speed of ESP32
And use the second core
And we'll only use the Arduino IDE
Let's get started!
Greatings youtubers, here is the guy with Swiss accent
with the new episode around sensors and microcontrollers.
The new ESP32 has three cores
Two of then are very fast, the third is ultra low power.
The Arduino IDE typically only use one of the fast cores
Today, we will take full advantage of the second core of the ESP32
We'll test if it really increases the capacity of our microprocessor
We'll also compare its dual core speed with the speed of an Arduino UNO
We'll try to synchronize tasks, even if they run on two different cores
We'll also try to use the same data in both cores
These two mechanisms are mandatory if you want to use two cores in a productive fashion
And we will not leave the Arduino IDE
Promised
This video is only possible because ExpressIF changed something
when they implemented Arduino IDE on ESP32
They added a realtime operating system called RTOS
And most of us did not notice or cared about that
What is a realtime operating system?
It is an operating system like Linux ou Windows
just very tiny and much less powerful
But it can handle several tasks in parallel
which run independently
Our Arduino sketch, for an example, runs as one task
We can check in which core a sketch runs
by printing the value of: xPortGetCoreID
This function returns the core a sketch run on