Introduction to RTOS Part 2 - Getting Started with FreeRTOS | Digi-Key Electronics

  Рет қаралды 348,027

DigiKey

DigiKey

3 жыл бұрын

FreeRTOS is a free and open source real-time operating system (RTOS) owned and maintained by Amazon.
The solution to the challenge in the video can be found here: www.digikey.com/en/maker/proj...
ESP-IDF FreeRTOS SMP Changes: docs.espressif.com/projects/e...
Add this URL to the "Additional Boards Manager URLs" window in Arduino for ESP32 support: dl.espressif.com/dl/package_e...
In this video, we talk about how a task is created in FreeRTOS using the ESP32 and Arduino. A task in FreeRTOS is similar to a thread in other multi-threaded environments (e.g. POSIX). It is a unit of CPU utilization designed to accomplish some goal. For our purposes, we just want to create a new thread and toggle an LED.
The ESP32 that comes with many development boards (including the Adafruit Feather HUZZAH32 shown in the video) runs a modified version of FreeRTOS (if you are using the ESP32 package for Arduino or the Espressif SDK). Most importantly, the ESP32 version (named ESP-IDF) supports the dual-core processor on the ESP32. Tasks created with the regular xTaskCreate() can run on either core as chosen by the scheduler.
For demo purposes, we want to run all tasks on a single core. This will allow us to experiment with prioritization and shared resources later in this series. To do this on the ESP32, we use the xTaskCreatePinnedToCore() function instead and specify which core to use. If you are using vanilla FreeRTOS in your own build system, you will want to use xTaskCreate() instead.
Product Links:
www.digikey.com/en/products/d...
Related Videos:
Introduction to RTOS Part 1 - What is a Real-Time Operating System (RTOS)? - • Introduction to RTOS P... ​
Introduction to RTOS Part 2 - Getting Started with FreeRTOS - • Introduction to RTOS P... ​
Introduction to RTOS Part 3 - Task Scheduling - • Introduction to RTOS P... ​
Introduction to RTOS Part 4 - Memory Management - • Introduction to RTOS P... ​
Introduction to RTOS Part 5 - Queue - • Introduction to RTOS P... ​
Introduction to RTOS Part 6 - Mutex - • Introduction to RTOS P... ​
Introduction to RTOS Part 7 - • Introduction to RTOS P... ​
Introduction to RTOS Part 8 - • Introduction to RTOS P...
Introduction to RTOS Part 9 - • Introduction to RTOS P...
Introduction to RTOS Part 10 - • Introduction to RTOS P...
Introduction to RTOS Part 11 - • Introduction to RTOS P...
Introduction to RTOS Part 12 - • Introduction to RTOS P...
Related Project Links:
www.digikey.com/en/maker/proj...
Related Articles:
www.digikey.com/en/maker/proj...
Learn more:
Maker.io - www.digikey.com/en/maker
Digi-Key’s Blog - TheCircuit www.digikey.com/en/blog
Connect with Digi-Key on Facebook / digikey.electronics
And follow us on Twitter / digikey

Пікірлер: 145
@juanperez2006
@juanperez2006 2 жыл бұрын
I love this series. Haven't had the need to use an RTOS yet, but I'm really enjoying learning about it.
@AlwinArrasyid
@AlwinArrasyid 3 жыл бұрын
Thank you for these FreeRTOS videos. They're super helpful for me. I'm looking forward to future videos!
@manuel56354
@manuel56354 3 жыл бұрын
This series looks great! Looking forward for the next videos and next series!
@Quarky_
@Quarky_ 3 жыл бұрын
Amazing! Clear, and very information dense, but not overwhelming.
@MrWATCHthisWAY
@MrWATCHthisWAY 3 жыл бұрын
This gives a greater understanding of the language instead of coping & pasting then just changing the time sequence! Thanks for the tutorial because I learn every time..
@darrennewell3845
@darrennewell3845 2 жыл бұрын
I can't believe this information is provided for free. Thank you so much for making this knowledge accessible.
@louis2760
@louis2760 3 жыл бұрын
These Videos are great! Looking forward to the next one (hopefully very soon).
@mranthony1886
@mranthony1886 3 жыл бұрын
No fluff and quickly moving through it in good detail thanks.
@darkrasen
@darkrasen 7 ай бұрын
This series is great! Your teaching style in inspiring. Such depth of knowledge and attention to detail. Hopefully Digikey will keep producing material with Shawn Hymel 🙏
@JeromeDemers
@JeromeDemers 3 жыл бұрын
finally KZbin algorithm that is on point! Thanks Shawn!
@rochdimaria
@rochdimaria 3 жыл бұрын
Right after i get courses on RTAI Linux , it is pretty the same concept but you made it so much easier and fun !
@hallkbrdz
@hallkbrdz 2 жыл бұрын
A year later - but really appreciating this series. I need to build a custom motor driver to control 4 full h-bridge drivers chips with single on/off pulses as short as 5uS, in addition to also receiving output from an absolute encoder to get rotor angle information, throttle input, etc. to calculate and drive those 4 other stator control tasks. A general purpose OS is not going to cut it. Now if this supply chain issue can get resolved so I can actually purchase some of these demo boards to work with...
@antoine_marchal
@antoine_marchal 3 жыл бұрын
Thank you this makes start using FreeRtos and ESP32 much simpler!
@sagebrother
@sagebrother 2 жыл бұрын
Fascinating topic and thanks for taking the time to create this series and others.
@sirsundays
@sirsundays 3 жыл бұрын
Not gonna lie this series seems to be great!
@tehmudjinkhan2207
@tehmudjinkhan2207 3 жыл бұрын
Just finished a course in embedded systems using FreeRTOS. With these videos I can keep learning!
@SaiKrishna-wl1ql
@SaiKrishna-wl1ql 3 жыл бұрын
Where u have learned ?
@tehmudjinkhan2207
@tehmudjinkhan2207 3 жыл бұрын
@@SaiKrishna-wl1ql The Royal Institute of Technology in Sweden.
@SaiKrishna-wl1ql
@SaiKrishna-wl1ql 3 жыл бұрын
@@tehmudjinkhan2207 okay bro ....all the best ...
@valizeth4073
@valizeth4073 3 ай бұрын
@@tehmudjinkhan2207 big L - Chalmers Student
@rbclima
@rbclima 2 жыл бұрын
Amazing stuff! Very well presented! Congrats
@sharlsherif5710
@sharlsherif5710 2 жыл бұрын
Thank you so much for this free content.
@markusstaden
@markusstaden 2 жыл бұрын
This Series is awesome! I would love to see something similar for ESP-IDF. I can't make the transition from the Arduino Framework to the IDF Framework
@galileo_rs
@galileo_rs 3 жыл бұрын
Every time I see this opening scene I think of an old cartoon but can't remember the name of the show or the character. Great series BTW, very informative.
@michapeka2800
@michapeka2800 3 жыл бұрын
Looking foward to next video!
@longautomation
@longautomation Ай бұрын
Thank you Sir ! I'm from Vietnam.
@gunter1626
@gunter1626 3 жыл бұрын
Great video Shawn! Thank you for the work that you put into it, it's very valuable for me. I was just leaving Arduino IDE behind and moved to VSCode with ESP-IDF. It might be something to consider for your videos as i feel the Arduino IDE is a dead-end?
@atomicnoexcept
@atomicnoexcept 3 жыл бұрын
Absolutely love this video. We developed a game for the ODROID GO (based on the ESP32), and we could not deal with the arduino IDE. It’s OK for small projects, but it does not scale very well. Your video makes me want to dive back into ESP32 projects. We had to create tasks for Display refresh and pin it to Core 1, with the main game loop running on Core 0. We also setup an ISR to manage the creation of music using LibXMP. Fun stuff!!
@yashgiramkar4973
@yashgiramkar4973 3 жыл бұрын
This series is really great. Thanks a lot Shawn. Will be waiting for future videos. Just wanted to know at what frequency you would be uploading videos over here?
@ShawnHymel
@ShawnHymel 3 жыл бұрын
Should be 3 or 4 each month, so about once per week (with a few off weeks). The plan is to make 10 episodes right now.
@user-fo4kd6mp7l
@user-fo4kd6mp7l 9 ай бұрын
All your posts are awesome 👍
@MikeNugget
@MikeNugget 3 жыл бұрын
Great channel. Would be nice to see more about internet, web, server, websockets, cameras and video streaming on freertos.
@all-about-automation
@all-about-automation 9 ай бұрын
Thanks 👍👍Brother , for help me write my first rtos program
@IlyaSTM-uv5gy
@IlyaSTM-uv5gy 3 жыл бұрын
I am very grateful for your great videos! There is a small problem, KZbin has identified the video language as Korean and incorrectly generates subtitles. You have excellent diction and as a non-native speaker I understand most of it, but without subtitles it's a bit difficult. I will be very grateful for the subtitles!)))
@ShawnHymel
@ShawnHymel 3 жыл бұрын
Thanks for the heads up. I flagged this is a problem, and hopefully KZbin will auto-generate new English captions soon.
@alirezasarrami1955
@alirezasarrami1955 2 жыл бұрын
very very very very very very very very very very very very very very nice was a valuable tutorial
@oswevega2939
@oswevega2939 Жыл бұрын
very good info ! thanks man !
@lelliscanario3527
@lelliscanario3527 3 жыл бұрын
Excelent video. 👍
@ParsMaker
@ParsMaker 3 жыл бұрын
nice introduction ,thanks for shear
@DavidBarbarine
@DavidBarbarine 3 жыл бұрын
Outstanding!
@pipoyII
@pipoyII 3 жыл бұрын
thank you! it made easy
@OthmanAlikhan
@OthmanAlikhan 3 жыл бұрын
Thanks for the video =)
@Arick_Lee
@Arick_Lee 2 күн бұрын
I wind up here as I got to the point in my automation programming experience where I've recognized how useful fanuc's shared memory multi processor systems concurrent execution on thier six axis robot architecture is.
@markjeffalfeche5331
@markjeffalfeche5331 3 жыл бұрын
Great video. I just hope the audio is balance for all your videos, because I need to lower the volume whenever instrument/music is filled in the video (TOO LOUD).
@kavishladha9231
@kavishladha9231 25 күн бұрын
my solution to the challenge - (written in esp-idf, on vs code) hope it helps. i have worked with freertos before but a long time back, so needed to start from basics again as i was not using it in day to day basis until now, and now i will which i why here i am again to study it . (will read docs later) #include #include #include #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "freertos/queue.h" #include "esp_system.h" #include "driver/gpio.h" #include "esp_random.h" #define LED_GPIO 2 #define PREV_LEVEL 0 volatile int DELAY = 500; volatile int count = 0; QueueHandle_t delayQueue; gpio_config_t my_gpio_config = { .mode = GPIO_MODE_OUTPUT, .pin_bit_mask = (1
@mohammadrezahelali6947
@mohammadrezahelali6947 7 ай бұрын
thanks for sharing video, i should only esp32 for use free rtos, other microcontroller doesn't work?
@Emanavas01
@Emanavas01 3 жыл бұрын
Thanks for all! How can I know how much size I most use the Stack Size? How can I do a NanoSeconds Delay?
@ShawnHymel
@ShawnHymel 3 жыл бұрын
I'm not quite following the first question. If you're trying to calculate the stack size, it's somewhat of a guess--I plan to cover stack and heap usage in part 4. The timing in most RTOSes is on the millisecond scale (I discuss this in part 3), so you cannot get nanosecond precision using an RTOS whose tick timer is 1 ms (the default in ESP-IDF). You can still set up a hardware timer outside of the RTOS to do things like delay and get a timestamp (this is dependent on the individual microcontroller). However, remember that a 100 MHz has a period of 10 ns, so even with a really fast microcontroller, you still can't get nanosecond precision. You'd need a 1+ GHz clock to get there or look at using other hardware (e.g. external hardware or custom hardware via FPGA) to do that.
@MuhammadDaudkhanTV100
@MuhammadDaudkhanTV100 3 жыл бұрын
So super hit
@bayanicustodio3998
@bayanicustodio3998 3 жыл бұрын
I have one question, is the priority set or can the priority be changed during runtime by the thread/task? I ask because I can see situation where a certain thread requires higher priority when certain parameters are consistently changing and a lower priority when a certain steady state is reached by one or more other parameter(s) dependent on other thread/task results.
@ShawnHymel
@ShawnHymel 3 жыл бұрын
Great question! Yes, you can change the priority of a task at runtime using vTaskPrioritySet(), which you can read about here: www.freertos.org/a00129.html. There are times when you need to change the priority, as you've described. There's a particularly nasty bug called "priority inversion" that can happen, and you need to be able to change priorities of tasks on the fly to fix it.
@ksawery6568
@ksawery6568 3 жыл бұрын
4:21 I couldn't stop laughing went you went searching for the header file - in an infinitely deep level of hidden folders
@ShawnHymel
@ShawnHymel 3 жыл бұрын
Oh yeah...they buried those RTOS files deep in the Arduino labyrinth of folders :D
@adityasreeram.k.s9527
@adityasreeram.k.s9527 6 ай бұрын
I struggled a bit to understand why #if, BaseType_t, and few other terms used. After few background search I found out: 1. # - these are pre-processor directives. i.e., processed before actual compilation. Thus, #if statement already decides what's the value of app_cpu even before actual compilation. 2. BaseType_t is typedef (keyword to create new type alia) in header file, and it was int. This is what I understood, do point out if I have mistaken these terms.
@geoffjgs
@geoffjgs 3 жыл бұрын
Hi Shawn, thanks for the tutorial. A question: While I could get your Part2 challenge code to compile and load it would not run on my standard ESP32 WROOM-32 dev board. By changing just one thing in the code, 'app_cpu' to 'NULL' it would then run. My Arduino IDE and libraries and json links are all up-to-date. Looks like it only runs if it can pick its own 'core' ???? Any thoughts? Geoff
@geoffjgs
@geoffjgs 3 жыл бұрын
Ok, if I change from core1 to core0, the code will run without any other changes. #if CONFIG_FREERTOS_UNICORE static const BaseType_t app_cpu = 1; #else static const BaseType_t app_cpu = 0; #endif I am still learning about esp32 and rtos so I would like to understand why the code will compile and load without any problem but will only run on core0 but not core1. Could it be that core1 is busy doing something else???
@geoffjgs
@geoffjgs 3 жыл бұрын
ANSWER: Yes is was busy! For anyone else having the same issue I used - Serial.println(xPortGetCoreID()); - to track down what was happening. Once the code entered the 'main loop' on 'core1', that's where it stayed endlessly looping, consequently the rtos tasks never execute. I don't know why this happens. Once some code (like Serial.print()) is entered in the 'main loop' the rtos tasks execute in their respective cores. I have no explanation for this either, maybe it will be explained in one of Shawn's later, excellent RTOS KZbins which I'm currently working my way through. This is the code I used to see what was happening in each of the cores... #include // * Solution to 02 - Blinky Challenge /* // Use only core 1 for demo purposes #if CONFIG_FREERTOS_UNICORE static const BaseType_t app_cpu = 0; #else static const BaseType_t app_cpu = 1; #endif */ // LED rates static const int rate_1 = 500; // ms static const int rate_2 = 300; // ms // Pins static const int led_pin = 2; // Our task: blink an LED at one rate void toggleLED_1(void *parameter) { while(1) { digitalWrite(led_pin, HIGH); vTaskDelay(rate_1 / portTICK_PERIOD_MS); digitalWrite(led_pin, LOW); vTaskDelay(rate_1 / portTICK_PERIOD_MS); Serial.print("Created task1: Executing on core "); Serial.println(xPortGetCoreID()); } } // Our task: blink an LED at another rate void toggleLED_2(void *parameter) { while(1) { digitalWrite(led_pin, HIGH); vTaskDelay(rate_2 / portTICK_PERIOD_MS); digitalWrite(led_pin, LOW); vTaskDelay(rate_2 / portTICK_PERIOD_MS); Serial.print("Created task2: Executing on core "); Serial.println(xPortGetCoreID()); } } void setup() { Serial.begin(9600); delay(1000); Serial.print("Setup: Executing on core "); Serial.println(xPortGetCoreID()); // Configure pin pinMode(led_pin, OUTPUT); // Task to run forever xTaskCreatePinnedToCore( // Use xTaskCreate() in vanilla FreeRTOS toggleLED_1, // Function to be called "Toggle 1", // Name of task 1024, // Stack size (bytes in ESP32, words in FreeRTOS) NULL, // Parameter to pass to function 0, // Task priority (0 to configMAX_PRIORITIES - 1) NULL, // Task handle 1); // Run on one core1 (ESP32 only) // Task to run forever xTaskCreatePinnedToCore( // Use xTaskCreate() in vanilla FreeRTOS toggleLED_2, // Function to be called "Toggle 2", // Name of task 1024, // Stack size (bytes in ESP32, words in FreeRTOS) NULL, // Parameter to pass to function 0, // Task priority (0 to configMAX_PRIORITIES - 1) NULL, // Task handle 0); // Run on one core0 (ESP32 only) // If this was vanilla FreeRTOS, you'd want to call vTaskStartScheduler() in // main after setting up your tasks. } void loop() { Serial.print("Main Loop: Executing on core "); Serial.println(xPortGetCoreID()); delay(1000); }
@DeLaCruzer11
@DeLaCruzer11 3 жыл бұрын
Please put the link in the description for the webpage @2:53 Also add in the description the JSON link to add in the Preference of Arduino IDE.
@ShawnHymel
@ShawnHymel 3 жыл бұрын
Good catch, thanks. I'll see if I can get those links added to the description.
@MatteoCordray
@MatteoCordray 3 жыл бұрын
If I want to make a professional product that needs a more robust framework but I want to use an ESP32, does it make sense to work with ESP-IDF? Or is the Arduino framework and libraries robust enough to make products in the professional setting?
@ShawnHymel
@ShawnHymel 3 жыл бұрын
I would tend to say use ESP-IDF for more professional use cases, as you get greater control over what's happening in the code. However, I know lots of people deploy Arduino code, as it makes time to market faster (but they run the risk of not knowing if some bugs may crop up that were outside of their control). I suppose it's a tradeoff: how much control do you want in the program vs. how fast do you want to get something deployed?
@carldarby935
@carldarby935 3 жыл бұрын
this is fascinating.I know you said you were only going to talk about using one core for this series. I am curious if you could use both cores to control an LCD display.one core could retrieve a bmp file from an SD card and the second core could load the image into the display.This could potentially double the frame rate of the set up?
@ShawnHymel
@ShawnHymel 3 жыл бұрын
Yes, you can. The dual-core ESP32 is very powerful and lets you truly run concurrent tasks. Please note that by default, the second core in the ESP32 is often reserved for WiFi and Bluetooth stacks. However, there's nothing preventing you from using that second core to draw stuff to an LCD faster! Just note that you will need to use something like a double buffer and a lock (e.g. semaphore) to let the drawing task know that a new buffer is ready. You don't want to accidentally overwrite a buffer while you're trying to read from it at the same time!
@carldarby935
@carldarby935 3 жыл бұрын
@@ShawnHymel thank you.It is something I may try once I learn more about RTOS.I think with the increased frame rate I may be able to play 10-20 fps video using an ESP32 and a 160 by 128 LCD screen. I have been reading about binary semaphores to coordinates the tasks, but it is a bit complicated.Your videos are so much easier to understand.
@Kefford666
@Kefford666 3 жыл бұрын
I have an ESP32 sat doing nothing so this seems like a great way to make use of it whilst also learning about RTOS 🙂 I am mainly interested for STM32 development though as that’s what I base my projects on. I bought the ESP32 after hearing how cheap and powerful they were, only to find that the IDF dev environment is pretty horrible. It makes sense to use Arduino IDE for this even though it feels like beginner programming as it smooths all the rough edges of the ESP32 experience. I couldn’t bring myself to use it in a professional setting though.
@ShawnHymel
@ShawnHymel 3 жыл бұрын
I'm seeing more ESP32s used in professional settings, so they seem to be gaining in popularity as an IoT device (and they're cheap!). However, I agree that the ESP-IDF feels a little rough sometimes (I haven't used it much, so that's based on my limited experience). If you're mostly interested in using STM32, I might recommend seeing how to get FreeRTOS running on a Nucleo board from their CubeIDE and then working through the challenges in these videos with that. Some of the function calls will be a little different (e.g. xTaskCreate()), but all of the concepts should be the same. STM32's official video on using FreeRTOS: kzbin.info/www/bejne/h3i5cpSve65okLM My FreeRTOS on STM32 video: kzbin.info/www/bejne/hYHVlKOYgLOGoLc
@quillaja
@quillaja 3 жыл бұрын
I'm new to microcontrollers, and decided to get and start with the adafruit huzzah esp32 that is also used in this video series. I knew I didn't want to use the Arduino IDE, but found it pretty easy to get setup using "arduino-cli" for compilation and upload, and VS Code as my IDE. The hardest part was figuring out where all the header files were located so I could tell VS Code about them and get intellisense. When I decided to learn about creating custom partitions and using the SPIFFS file system, I had to use some of the tools that (i guess?) are part of the IDF, but were included with the things the arduino-cli downloaded when I set up the board. A short read of the docs and some experimenting, and I had figured out how to create and upload my own partitions, make/upload a spiffs image, and up upload an executable binary compiled with arduino-cli.
@Kefford666
@Kefford666 3 жыл бұрын
@@quillaja Sounds good. When I had to work on the ESP32 at an old job we used Visual Studio and the VisualGDB extension which made things a bit nicer. It was a nightmare to ensure matching environments between different developers though, one person could be using GNU Make while another CMake and Ninja and have different versions of ESP-IDF checked out. For personal use and just faffing about I think Arduino IDE is fine but when you want strict control over everything and have all the source under version control (rather than just your code under version control and the library dependencies pulled from elsewhere and linked at compile time) then it’s no good. I like the idea of intellisense though so I’ll try your way too 👍🏻
@alerey4363
@alerey4363 3 жыл бұрын
It would be better if led responds to some input form (at the very least pressing a switch); this way you really showcase the purpose of an RTOS which has to react immediately to an external event
@ShawnHymel
@ShawnHymel 3 жыл бұрын
Stay tuned ;) I'm building up to that slowly to give people a feeling for working with multiple threads.
@folya38
@folya38 3 жыл бұрын
i cant find esp32 library by espressif in Library Manager after adding link to "Additional Boards Manager URLs"
@Haxory1
@Haxory1 Жыл бұрын
I am using archlinux for this, I had to do several step to get everything working: - install pyserial (python -m pip install pyserial) - give permissions to dev (sudo usermod -a -G uucp && sudo usermod -a -G tty - logout -> login - make sure the usb cable has data wires and not only power - hold the boot button when I upload
@Fencingfan
@Fencingfan 3 жыл бұрын
Great video! Just hoping you will not be reading a script. A video without error or misspeaking is impressive, but for the audience it is much more important to be able to follow your thoughts easily.
@fwingebritson
@fwingebritson 3 жыл бұрын
Most content creators do follow a script in order for people to easily follow their thoughts.
@user-tc3rh5qp3y
@user-tc3rh5qp3y 2 жыл бұрын
good luck
@atyantarumaksari7252
@atyantarumaksari7252 3 жыл бұрын
Thanks
@sanilalkuttimon1755
@sanilalkuttimon1755 3 жыл бұрын
❤️❤️
@altamashjawad6691
@altamashjawad6691 2 жыл бұрын
Hey, can I use the same tutorials on an ESP82?
@saikirangattu8252
@saikirangattu8252 2 жыл бұрын
what are the pre requisites for this course. I am C++ application developer and do not have any experience withh embedded programs and RTOSs. So whats the best point to start learning embedded programming?
@nagarava
@nagarava 3 жыл бұрын
Sir, please explain how to install Esp8266 also, I have Rsp8266 only, here Esp 32 not available
@kennethcarvalho3684
@kennethcarvalho3684 Жыл бұрын
Super video... But i did not understand the purpose of downloading the freertos.. Is it being used in this sketch?
@adambzh
@adambzh Жыл бұрын
great videos, but do some volume balancing please...
@debaprakashbarik6260
@debaprakashbarik6260 3 жыл бұрын
Can I use free RTOS in Raspberry pi 3?
@side_character
@side_character 9 ай бұрын
Can someone please clear something for me? in 10:06 he said " In other systems, you would need to call the vTaskStartScheduler function". what did he mean by "other systems" here. I'm sorry... I'm really new in this. i just want to clearly understand the context here.
@naresh9526
@naresh9526 2 жыл бұрын
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header, anyone knows how to solve this??
@Mrjaydesign
@Mrjaydesign 3 жыл бұрын
Cool🇬🇧
@McCaffreyJohn
@McCaffreyJohn Жыл бұрын
Don't believe but it really worked
@JibrinJohn-zx5my
@JibrinJohn-zx5my 28 күн бұрын
Does modern-day robotic industry use a 16bit microcontroller?
@michaelkremer3146
@michaelkremer3146 2 жыл бұрын
Arduino: 1.8.19 (Windows 10), Board: "ESP32 Wrover Module, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), QIO, 80MHz, 921600, None" sketch_may02a:8:28: error: 'LED_BUILTIN' was not declared in this scope static const int led_pin = LED_BUILTIN; ^ exit status 1 'LED_BUILTIN' was not declared in this scope Dieser Bericht wäre detaillierter, wenn die Option "Ausführliche Ausgabe während der Kompilierung" in Datei -> Voreinstellungen aktiviert wäre.
@armyant7
@armyant7 3 жыл бұрын
4:13 "Do as I say, not as I do"
@ShawnHymel
@ShawnHymel 3 жыл бұрын
Oops...hahaha. I was doing that action so quickly I didn’t notice that I had selected a previous version.
@spcreation1974
@spcreation1974 2 жыл бұрын
Playlist Link please?
@ddcbanz
@ddcbanz 3 жыл бұрын
Shawn Hymel I feel like your challenge is highlighting something you should NOT normally do with schedulers, that is, use the same system resource (a single LED) between two threads without a semaphore. I was cringing inside when you talked about the erratic blinking behavior because stuff like that can be very hard to debug as the threads fight for control! Maybe when you get to semaphores and mutexes, mention this is a bad practice in general!
@ShawnHymel
@ShawnHymel 3 жыл бұрын
Indeed it is not good practice :) I just wanted to get people comfortable creating their own tasks and start to understand that they can affect the same resource. This will come into play in future episodes when I cover kernel objects like mutexes and semaphores.
@AxelRoest
@AxelRoest 2 жыл бұрын
You need to crawl before you can walk or run. Love your series and the pace in which you increase knowledge, Shawn.
@newyorkdesignfashion6210
@newyorkdesignfashion6210 3 жыл бұрын
link to json Board Manager library for esp32 is no longer there
@ShawnHymel
@ShawnHymel 3 жыл бұрын
You mean this one? It still works for me: dl.espressif.com/dl/package_esp32_index.json
@tdtrecordsmusic
@tdtrecordsmusic 3 жыл бұрын
cool
@SaumavaDas
@SaumavaDas 2 жыл бұрын
can I run a command based browser on RTOS?
@diwakar8815
@diwakar8815 2 жыл бұрын
vannila free what does that mean?
@sampathkumarkasanagottu3805
@sampathkumarkasanagottu3805 3 жыл бұрын
Can I use ESP8266 for this workshop?
@ShawnHymel
@ShawnHymel 3 жыл бұрын
The ESP8266 does not run FreeRTOS out of the box, so you would need to include it in your build system. There are a couple of options for doing so: github.com/espressif/ESP8266_RTOS_SDK and github.com/SuperHouse/esp-open-rtos. I have not tried FreeRTOS on the ESP8266, so I can't promise how well it will work.
@sampathkumarkasanagottu3805
@sampathkumarkasanagottu3805 3 жыл бұрын
Thanks Shawn
@engineeringmarine6932
@engineeringmarine6932 3 жыл бұрын
No constexpr on arduino?
@ShawnHymel
@ShawnHymel 3 жыл бұрын
There is. I'm just avoiding it because it's specific to C++. I know that things like Serial are C++ objects, but I wanted to show how to use FreeRTOS with mostly C.
@user-zj8fq6zn2o
@user-zj8fq6zn2o 3 жыл бұрын
Can't auto generate subtitles. Language was tetermined (automatically) as korean ((
@ShawnHymel
@ShawnHymel 3 жыл бұрын
Give it a few more days. It seems KZbin needs some time to generate those subtitles.
@user-zj8fq6zn2o
@user-zj8fq6zn2o 3 жыл бұрын
@@ShawnHymel Cool )
@George-jg6ry
@George-jg6ry 3 жыл бұрын
Hi , is there a FreeRTOS IDE ??
@ShawnHymel
@ShawnHymel 3 жыл бұрын
There is not. FreeRTOS is just a library (a collection of C source and header files). You can import it into any IDE or build system you wish.
@George-jg6ry
@George-jg6ry 3 жыл бұрын
@@ShawnHymel Thank you very much for your answer. So can I equally do that with the STM IDEs? Kind Regards
@ShawnHymel
@ShawnHymel 3 жыл бұрын
@@George-jg6ry Yes. In fact, I have a video showing how to import FreeRTOS into STM32CubeIDE: kzbin.info/www/bejne/hYHVlKOYgLOGoLc
@bobriemersma
@bobriemersma 3 жыл бұрын
The Arduino IDE and language feels almost intentionally designed to limit users. That makes some sense considering its real target, yesterday's microcontrollers. The ESP8266, and even more so the ESP32, mark a point where a "Visual Basic" for microcontrollers is overdue.
@ShawnHymel
@ShawnHymel 3 жыл бұрын
From what I've seen, the modern equivalent of Visual Basic for microcontrollers is MicroPython and CircuitPython. Please keep in mind any of these high level languages introduce a good amount of overhead. While they make things much easier to program, there will still be developers wanting to use lower-level languages like C to keep things as fast and optimized as possible on the microcontroller.
@ArjanvanVught
@ArjanvanVught 3 жыл бұрын
A shame that a proper IDE is not used; for example Eclipse CDT
@DBBahnospherix-BahnAtmospherix
@DBBahnospherix-BahnAtmospherix 2 ай бұрын
4:37
@SupernovaSpence
@SupernovaSpence 3 жыл бұрын
You gonna finish this series? :/
@ShawnHymel
@ShawnHymel 3 жыл бұрын
Yes. Part 3 continues here: kzbin.info/www/bejne/b2bchpV5od6Zaac. Part 4 is also out. The cards at the end of the video should point you to the next episode. Right now, I'm planning on a total of 12 episodes. Once they're all out, I'm hoping we can get a playlist of them made.
@jhoughjr1
@jhoughjr1 3 жыл бұрын
seems all I have are esp8266s :/
@arammanoukian2359
@arammanoukian2359 3 жыл бұрын
#ifndef LED_BUILTIN #define LED_BUILTIN 2 #endif
@ShawnHymel
@ShawnHymel 3 жыл бұрын
Thanks. This is needed if your board does not have LED_BUILTIN defined in its Arduino package (most should), and you have an LED connected to pin 2.
@arammanoukian2359
@arammanoukian2359 3 жыл бұрын
Yea, some boards straight up have the built in LED connected to pin 2 and not defined in the Arduino package. Kudos for the good content
@EngineeringNS
@EngineeringNS 3 жыл бұрын
What is RTOS?!? 🤔
@ShawnHymel
@ShawnHymel 3 жыл бұрын
I cover that in the first episode: kzbin.info/www/bejne/fGSVYmNubN6Mr5Y :)
@wolfganglienbacher
@wolfganglienbacher 3 жыл бұрын
6:45 this is wrong info. The Arduino delay() function is in fact calling vTaskDelay() on the esp32. If you were using a proper IDE like VSCode and Platformio you could just right click and go to definition to see how the function is implemented. I do in fact think that for digikey it would be appropriate to actually use vscode instead of the arduino ide. Installation is about as simple, download vscode, install platformio plugin from within the ide and you're set.
@ShawnHymel
@ShawnHymel 3 жыл бұрын
Good to know delay() explicitly calls vTaskDelay() in ESP-IF. It’s technically non-blocking then, so it’s not exactly wrong. I do like PlatformIO and VSCode much better, but I chose Arduino thinking that more people have experience with it (even beginners). If more people are familiar with VSCode, I’m happy to start using that in a future series.
@wolfganglienbacher
@wolfganglienbacher 3 жыл бұрын
@@ShawnHymel well it's really just my personal opinion. Arduino IDE has it's place and it's covered extensively already. This was just a particular example where using VSCode enables you to simply see what's happening below the toplevel arduino functions. Great series anyway!
@ShawnHymel
@ShawnHymel 3 жыл бұрын
@@wolfganglienbacher Thanks! I do love the ability to go to a function definition and step-through debugging. I'm hoping to do more intermediate/advanced firmware series in the future, and some of those will probably necessitate step-through debugging, which means I'll likely have to use VSCode or a vendor-specific IDE :)
@tdtrecordsmusic
@tdtrecordsmusic 3 жыл бұрын
i also think it will be valuable to show this more !! >> the concept that these standard arduino functions are viewable is super important and will probably be eye opening to beginners
@darkfoxfurre
@darkfoxfurre 2 жыл бұрын
I bet you that the reason why FreeRTOS is never abbreviated as FRTOS is to keep people from calling it "Fart OS"
@JibrinJohn-zx5my
@JibrinJohn-zx5my 28 күн бұрын
Does
@Hasan...
@Hasan... 3 жыл бұрын
Drop the bowtie and I'll subscribe
@commodoredata360
@commodoredata360 3 жыл бұрын
Amazon ??? Actually Amazon forest in the 24th century have been fully regenerated
@Mr.RatanBajaj01
@Mr.RatanBajaj01 3 жыл бұрын
Hii brow
@jyoshnadeepala6912
@jyoshnadeepala6912 11 ай бұрын
in time span of 10 second, im listerning atleast 2 unfamiliar words!!...
@intheshell35ify
@intheshell35ify Жыл бұрын
Lies
@mrfudd13
@mrfudd13 3 жыл бұрын
2 things, 1.) sudden music TOO LOUD! stop trying to blow my ear drums. 2.) You should start with a brief definition of RTOS; I am over a minute in and still don't know what you're talking about.
@ShawnHymel
@ShawnHymel 3 жыл бұрын
Noted on the music, thank you. I have reduced the music volume going forward for parts 3 and beyond. Please see Part 1 where I define RTOS and talk about what it's used for: kzbin.info/www/bejne/fGSVYmNubN6Mr5Y
@DeltaPrismo
@DeltaPrismo 22 күн бұрын
Great vídeo btw.
@rogeronslow1498
@rogeronslow1498 3 жыл бұрын
Do you really feel you have reinforce the stereotype of engineers being nerds by wearing a ridiculous bowtie?
Getting Started with PlatformIO
51:54
DroneBot Workshop
Рет қаралды 609 М.
MEGA BOXES ARE BACK!!!
08:53
Brawl Stars
Рет қаралды 35 МЛН
Children deceived dad #comedy
00:19
yuzvikii_family
Рет қаралды 8 МЛН
Василиса наняла личного массажиста 😂 #shorts
00:22
Денис Кукояка
Рет қаралды 10 МЛН
Always be more smart #shorts
00:32
Jin and Hattie
Рет қаралды 46 МЛН
Introduction to RTOS Part 6 - Mutex | Digi-Key Electronics
13:44
Introduction to RTOS Part 5 - Queue | Digi-Key Electronics
12:01
Getting Started with ESP32 - Step-By-Step Tutorial
19:50
Tomasz Tarnowski
Рет қаралды 319 М.
Introduction to ESP32 - Getting Started
47:57
DroneBot Workshop
Рет қаралды 1,6 МЛН
Спутниковый телефон #обзор #товары
0:35
Product show
Рет қаралды 2,1 МЛН
PART 52 || DIY Wireless Switch forElectronic Lights - Easy Guide!
1:01
HUBAB__OFFICIAL
Рет қаралды 23 МЛН
Собери ПК и Получи 10,000₽
1:00
build monsters
Рет қаралды 2,2 МЛН
Игровой Комп с Авито за 4500р
1:00
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 1,9 МЛН