PERFORMANCE BENCHMARKING WITH FREERTOS | ADVANCED ESP32

Описание к видео PERFORMANCE BENCHMARKING WITH FREERTOS | ADVANCED ESP32

Performance Benchmarking with FreeRTOS implementation in the SparkFun ESP32 Thing

In this video, we are going to look at the performance comparison between an Arduino UNOR3, ESP8266 and the ESP32, Finally, We will also compare the performance increase in the ESP32 with the implementation of FreeRTOS Multitasking and Intertask Communication.

(If you liked this video and would like to buy our course, you are in for a pleasant surprise. Please click on the link below to buy the course for $25 ONLY. Original price is $195.
https://utm.io/upz2)

By now, you would have experienced first hand the capabilities of the SparkFun ESP32 Thing. It's no surprise that the ESP32 is indeed faster than any of the other boards we are going to compare it with. But in this video, we are going to find out exactly how faster the ESP32 is, especially with FreeRTOS implementation to use that extra core that is dormant.

Most speed tests out there use only some artificial software load to compare the speed of execution. But i have cooked up a simple yet powerful template code, that can put a strain on the core by using both software and hardware loads.

Please, download all the codes, from the resources section or access it from the repository downloaded earlier. Now load the ArduinoUNOR3.ino Code in the Arduino IDE. Let me explain the template code as it is reused for all other boards with slight tweaks here and there.
In the code, we have first imported the ‘math.h” library so that we can work with the power function to find the power of value. The code will also have 3 functions. The first function is the “double_pow” function which takes in a variable of data type unsigned integer. It then iterates from 0 to that number and on each iteration, it finds the square of the number. The function also keeps track of the time it took for execution with the “millis()” function and returns the value. Thus this function adds a software load on the CPU.

The second function is “loop_gpio”. This function adds a hardware load on the CPU. The way we do it is by switching a GPIO pin ON and OFF very fast for a specified number of times. Just like the “double_pow” function it takes in a variable of data type unsigned integer. It then iterates from 0 to that number and on each iteration, it quickly set the GPIO pin 13 high and low. The function also keeps track of the time it took for execution with the “millis()” function and returns the value.

The third function is the “do_measure” function. The purpose of this function is to set the input parameter count for both the previous functions and to take the sum of the execution time for both the functions combined. Finally, it will convert the execution time from millisecond to seconds and prints it on the serial monitor. Inside the “do_measure” function you can see that we have used a “+=” operator for these two lines of codes. This is done when we need to do a cumulative sum of two independent variables as shown here. If you go through the code you can see that “uint32_t” is used a lot. This is a datatype called as an unsigned integer. It can hold only whole numbers, but no negatives. The number after the “unit” refers to the number of bits the data type uses. Thus 32 bits can hold numbers from 0 to 2 raised to 32.

In the “void setup”, we begin the serial monitor with the baud rate of 9600, as we are using the Arduino UNOR3. In the “void loop”, we have called the “do_measure” function, which will initiate the speed test on the Arduino UNOR3. After uploading the code to our Arduino UNOR3i have opened the serial monitor and set the baud rate to 9600. After waiting for some time, I have got the result of the speed test. The combined software and hardware load took around 7.1 seconds to complete on an Arduino.

Summary,
In this video, we have covered the following topics
●Performance Comparison between Arduino UNOR3, NodeMCU ESP8266, and SparkFun ESP32 Thing
●Performance Comparison with and without FreeRTOS implementation on the Sparkfun ESP32 Thing

(If you liked this video and would like to buy our course, you are in for a pleasant surprise. Please click on the link below to buy the course for $25 ONLY. Original price is $195.
https://utm.io/upz2)

Check us out on
Website : https://makerdemy.com
Catalogue : https://makerdemy1.teachable.com
Facebook :   / makerdemy  
Twitter :   / makerdemy  
LinkedIn :   / makerdemy  
Instagram :   / makerdemy  
Email : [email protected]

Комментарии

Информация по комментариям в разработке