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

Поділитися
Вставка
  • Опубліковано 10 січ 2021
  • 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
  • Наука та технологія

КОМЕНТАРІ • 141

  • @juanperez2006
    @juanperez2006 2 роки тому +24

    I love this series. Haven't had the need to use an RTOS yet, but I'm really enjoying learning about it.

  • @hallkbrdz
    @hallkbrdz 2 роки тому +9

    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...

  • @AlwinArrasyid
    @AlwinArrasyid 3 роки тому +2

    Thank you for these FreeRTOS videos. They're super helpful for me. I'm looking forward to future videos!

  • @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..

  • @Quarky_
    @Quarky_ 3 роки тому +4

    Amazing! Clear, and very information dense, but not overwhelming.

  • @manuel56354
    @manuel56354 3 роки тому +4

    This series looks great! Looking forward for the next videos and next series!

  • @mranthony1886
    @mranthony1886 3 роки тому

    No fluff and quickly moving through it in good detail thanks.

  • @rochdimaria
    @rochdimaria 3 роки тому +2

    Right after i get courses on RTAI Linux , it is pretty the same concept but you made it so much easier and fun !

  • @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 роки тому +2

    These Videos are great! Looking forward to the next one (hopefully very soon).

  • @darkrasen
    @darkrasen 6 місяців тому +2

    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 🙏

  • @antoine_marchal
    @antoine_marchal 3 роки тому

    Thank you this makes start using FreeRtos and ESP32 much simpler!

  • @JeromeDemers
    @JeromeDemers 3 роки тому +14

    finally UA-cam algorithm that is on point! Thanks Shawn!

  • @sagebrother
    @sagebrother 2 роки тому

    Fascinating topic and thanks for taking the time to create this series and others.

  • @DM-ei6oo
    @DM-ei6oo 3 роки тому

    What a great channel. Big fan of digikey. If they don’t have a part then it doesn’t exist.

  • @markusstaden
    @markusstaden 2 роки тому +4

    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

  • @sirsundays
    @sirsundays 3 роки тому +1

    Not gonna lie this series seems to be great!

  • @rbclima
    @rbclima 2 роки тому +1

    Amazing stuff! Very well presented! Congrats

  • @tehmudjinkhan2207
    @tehmudjinkhan2207 3 роки тому +23

    Just finished a course in embedded systems using FreeRTOS. With these videos I can keep learning!

    • @SaiKrishna-wl1ql
      @SaiKrishna-wl1ql 3 роки тому +4

      Where u have learned ?

    • @tehmudjinkhan2207
      @tehmudjinkhan2207 3 роки тому +6

      @@SaiKrishna-wl1ql The Royal Institute of Technology in Sweden.

    • @SaiKrishna-wl1ql
      @SaiKrishna-wl1ql 3 роки тому +4

      @@tehmudjinkhan2207 okay bro ....all the best ...

    • @valizeth4073
      @valizeth4073 2 місяці тому

      @@tehmudjinkhan2207 big L
      - Chalmers Student

  • @galileo_rs
    @galileo_rs 3 роки тому +1

    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.

  • @sharlsherif5710
    @sharlsherif5710 2 роки тому +1

    Thank you so much for this free content.

  • @atomicnoexcept
    @atomicnoexcept 3 роки тому +2

    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!!

  • @gunter1626
    @gunter1626 3 роки тому +6

    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?

  • @michapeka2800
    @michapeka2800 3 роки тому

    Looking foward to next video!

  • @longautomation
    @longautomation День тому

    Thank you Sir ! I'm from Vietnam.

  • @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 8 місяців тому

    Thanks 👍👍Brother , for help me write my first rtos program

  • @user-fo4kd6mp7l
    @user-fo4kd6mp7l 8 місяців тому

    All your posts are awesome 👍

  • @yashgiramkar4973
    @yashgiramkar4973 3 роки тому +11

    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 роки тому +5

      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.

  • @ParsMaker
    @ParsMaker 3 роки тому

    nice introduction ,thanks for shear

  • @IlyaSTM-uv5gy
    @IlyaSTM-uv5gy 3 роки тому +3

    I am very grateful for your great videos! There is a small problem, UA-cam 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 роки тому +2

      Thanks for the heads up. I flagged this is a problem, and hopefully UA-cam will auto-generate new English captions soon.

  • @markjeffalfeche5331
    @markjeffalfeche5331 3 роки тому +1

    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).

  • @oswevega2939
    @oswevega2939 Рік тому

    very good info ! thanks man !

  • @alirezasarrami1955
    @alirezasarrami1955 2 роки тому +2

    very very very very very very very very very very very very very very nice
    was a valuable tutorial

  • @pipoyII
    @pipoyII 3 роки тому

    thank you! it made easy

  • @mohammadrezahelali6947
    @mohammadrezahelali6947 6 місяців тому

    thanks for sharing video, i should only esp32 for use free rtos, other microcontroller doesn't work?

  • @OthmanAlikhan
    @OthmanAlikhan 3 роки тому

    Thanks for the video =)

  • @lelliscanario3527
    @lelliscanario3527 3 роки тому +1

    Excelent video. 👍

  • @adityasreeram.k.s9527
    @adityasreeram.k.s9527 4 місяці тому

    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.

  • @Haxory1
    @Haxory1 11 місяців тому

    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

  • @DavidBarbarine
    @DavidBarbarine 3 роки тому

    Outstanding!

  • @Kefford666
    @Kefford666 3 роки тому +1

    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 роки тому +1

      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: ua-cam.com/video/QGVAayFI5ZQ/v-deo.html
      My FreeRTOS on STM32 video: ua-cam.com/video/OPrcpbKNSjU/v-deo.html

    • @quillaja
      @quillaja 3 роки тому +2

      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 роки тому +2

      @@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 👍🏻

  • @Emanavas01
    @Emanavas01 3 роки тому +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 роки тому +5

      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.

  • @carldarby935
    @carldarby935 3 роки тому +1

    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.

  • @folya38
    @folya38 3 роки тому

    i cant find esp32 library by espressif in Library Manager after adding link to "Additional Boards Manager URLs"

  • @alerey4363
    @alerey4363 3 роки тому +1

    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 роки тому +1

      Stay tuned ;) I'm building up to that slowly to give people a feeling for working with multiple threads.

  • @kennethcarvalho3684
    @kennethcarvalho3684 Рік тому

    Super video... But i did not understand the purpose of downloading the freertos.. Is it being used in this sketch?

  • @atyantarumaksari7252
    @atyantarumaksari7252 3 роки тому

    Thanks

  • @ksawery6568
    @ksawery6568 3 роки тому +1

    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

  • @altamashjawad6691
    @altamashjawad6691 2 роки тому

    Hey, can I use the same tutorials on an ESP82?

  • @DeLaCruzer11
    @DeLaCruzer11 3 роки тому +2

    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 роки тому +1

      Good catch, thanks. I'll see if I can get those links added to the description.

  • @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

  • @geoffjgs
    @geoffjgs 3 роки тому +1

    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 роки тому +2

      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 роки тому +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 UA-cams 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);
      }

  • @bayanicustodio3998
    @bayanicustodio3998 3 роки тому +1

    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.

  • @adambzh
    @adambzh Рік тому +1

    great videos, but do some volume balancing please...

  • @MatteoCordray
    @MatteoCordray 3 роки тому +1

    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 роки тому +1

      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?

  • @side_character
    @side_character 8 місяців тому

    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.

  • @MuhammadDaudkhanTV100
    @MuhammadDaudkhanTV100 3 роки тому

    So super hit

  • @McCaffreyJohn
    @McCaffreyJohn Рік тому

    Don't believe but it really worked

  • @debaprakashbarik6260
    @debaprakashbarik6260 3 роки тому

    Can I use free RTOS in Raspberry pi 3?

  • @user-tc3rh5qp3y
    @user-tc3rh5qp3y 2 роки тому +1

    good luck

  • @SaumavaDas
    @SaumavaDas 2 роки тому

    can I run a command based browser on RTOS?

  • @Fencingfan
    @Fencingfan 3 роки тому +2

    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.

  • @sanilalkuttimon1755
    @sanilalkuttimon1755 3 роки тому

    ❤️❤️

  • @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.

  • @naresh9526
    @naresh9526 2 роки тому

    A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header, anyone knows how to solve this??

  • @tdtrecordsmusic
    @tdtrecordsmusic 3 роки тому

    cool

  • @diwakar8815
    @diwakar8815 2 роки тому +1

    vannila free what does that mean?

  • @spcreation1974
    @spcreation1974 2 роки тому

    Playlist Link please?

  • @newyorkdesignfashion6210
    @newyorkdesignfashion6210 3 роки тому

    link to json Board Manager library for esp32 is no longer there

    • @ShawnHymel
      @ShawnHymel 3 роки тому +1

      You mean this one? It still works for me: dl.espressif.com/dl/package_esp32_index.json

  • @Mrjaydesign
    @Mrjaydesign 3 роки тому

    Cool🇬🇧

  • @ddcbanz
    @ddcbanz 3 роки тому +5

    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 роки тому +4

      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.

  • @armyant7
    @armyant7 3 роки тому +2

    4:13 "Do as I say, not as I do"

    • @ShawnHymel
      @ShawnHymel 3 роки тому +2

      Oops...hahaha. I was doing that action so quickly I didn’t notice that I had selected a previous version.

  • @sampathkumarkasanagottu3805
    @sampathkumarkasanagottu3805 3 роки тому +1

    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 роки тому +1

      Thanks Shawn

  • @engineeringmarine6932
    @engineeringmarine6932 3 роки тому +1

    No constexpr on arduino?

    • @ShawnHymel
      @ShawnHymel 3 роки тому +1

      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.

  • @George-jg6ry
    @George-jg6ry 3 роки тому +1

    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 роки тому +1

      @@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: ua-cam.com/video/OPrcpbKNSjU/v-deo.html

  • @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 роки тому +1

      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.

  • @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 UA-cam needs some time to generate those subtitles.

    • @user-zj8fq6zn2o
      @user-zj8fq6zn2o 3 роки тому +1

      @@ShawnHymel Cool )

  • @ArjanvanVught
    @ArjanvanVught 3 роки тому

    A shame that a proper IDE is not used; for example Eclipse CDT

  • @SupernovaSpence
    @SupernovaSpence 3 роки тому

    You gonna finish this series? :/

    • @ShawnHymel
      @ShawnHymel 3 роки тому +1

      Yes. Part 3 continues here: ua-cam.com/video/95yUbClyf3E/v-deo.html. 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 роки тому +1

    #ifndef LED_BUILTIN
    #define LED_BUILTIN 2
    #endif

    • @ShawnHymel
      @ShawnHymel 3 роки тому +1

      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 роки тому +1

      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

  • @DBBahnospherix-BahnAtmospherix
    @DBBahnospherix-BahnAtmospherix Місяць тому +1

    4:37

  • @darkfoxfurre
    @darkfoxfurre 2 роки тому +1

    I bet you that the reason why FreeRTOS is never abbreviated as FRTOS is to keep people from calling it "Fart OS"

  • @wolfganglienbacher
    @wolfganglienbacher 3 роки тому +1

    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 роки тому +2

      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 роки тому +1

      @@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 роки тому +1

      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

  • @EngineeringNS
    @EngineeringNS 3 роки тому

    What is RTOS?!? 🤔

    • @ShawnHymel
      @ShawnHymel 3 роки тому

      I cover that in the first episode: ua-cam.com/video/F321087yYy4/v-deo.html :)

  • @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

  • @jyoshnadeepala6912
    @jyoshnadeepala6912 9 місяців тому

    in time span of 10 second, im listerning atleast 2 unfamiliar words!!...

  • @Mr.RatanBajaj01
    @Mr.RatanBajaj01 3 роки тому +1

    Hii brow

  • @intheshell35ify
    @intheshell35ify Рік тому

    Lies

  • @rogeronslow1498
    @rogeronslow1498 3 роки тому +2

    Do you really feel you have reinforce the stereotype of engineers being nerds by wearing a ridiculous bowtie?

  • @mrfudd13
    @mrfudd13 3 роки тому +8

    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 роки тому +24

      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: ua-cam.com/video/F321087yYy4/v-deo.html