Getting started with Esp32 and PlatformIO | ESP-IDF | Visual Studio Code | ESP IDF C++ | Esp32 C++

Sdílet
Vložit
  • čas přidán 5. 07. 2024
  • In this video we will explain:-
    • Getting started with PlatformIO
    • Platformio install | esp32 platformio install
    • PlatformIO vscode introduction | esp32 platformio vscode introduction | Platform esp32 introduction
    • Getting started with ESP-IDF | ESP IDF | esp32 esp-idf | esp32 esp idf
    • esp idf installation
    • esp-idf introduction
    • Hello world program using C++
    • esp-idf c++ | esp idf c++
    • esp c++ | esp idf tutorial | esp32 c++ tutorial
    • esp32 c++ example | esp32 esp-idf
    _____________________________________________________________________________________
    Chapters:-
    00:00 Introduction
    00:26 Abiots Channel Intro
    00:36 Basic requirements
    00:44 Chapter One
    00:54 Installing the PlatformIO in vscode
    02:00 PlatformIO introduction
    03:08 Espressif 32 platform | esp32 Espressif
    04:12 PlatformIO features
    05:04 Chapter two
    05:13 Installing Espressif 32 in platformIO
    07:07 ESP IDF introduction
    09:09 Chapter three
    09:19 Creating new ESP IDF project
    10:31 Changing the extension to cpp
    11:00 Name Mangling in C++.
    12:58 ESP Logging library
    13:50 Const qualifier vs define macro
    14:45 uploading the code
    15:39 Extra Knowledge session
    17:52 End of first session
    _____________________________________________________________________________________
    Links and references:-
    • ESP IDF GitHub repository:- github.com/espressif/esp-idf
    • ESP-IDF Programming Guide :- docs.espressif.com/projects/e...
    • Abiots GitHub link:- github.com/AbIots/AbiotsEsp32...
    _____________________________________________________________________________________
    This is just the first of many ESP32-related videos, so be sure to subscribe for more!
    Things to refer:-
    • We have a playlist dedicated entirely to ESP32:- • ESP32 Series
    I hope you enjoy the video and please stay inside and stay safe!
    AbIoTs Lab
    #Iot #Esp32 #Espidf #platformio #vscode #abiots #abiotsLabs #internetofthings

Komentáře • 82

  • @nahuel3256
    @nahuel3256 Před rokem +2

    Hi, this lesson is Excellent!
    But I'm having issues when I try to build the code with PlatformIO
    * The terminal process "C:\Program Files\PowerShell\7\pwsh.exe -Command ninja " terminated with exit code: 1.
    I think that is because of the "space" character in the directory path.
    How can I correct that? I already tried removing/reinstalling VS code & PlatformIO
    I have NO problem when I build the same code directly from the ESP-IDF extension

    • @AbIoTsVidya
      @AbIoTsVidya  Před rokem

      Thank you for your feedback. Your feed is what keeps us motivated.🤩
      Did you try renaming the directory with no spaces? If so can you share here the full error message.

    • @nahuel3256
      @nahuel3256 Před rokem +1

      Hi @AbIoTs Lab , thanks for the answer.
      No, i didn't re name the directory. It's a "Program Files" directory, I'm afraid it'd do more bad than good.
      Is there any way to tell PlatformIO to execute pwsh.exe -Command ninja from a different directory?

    • @AbIoTsVidya
      @AbIoTsVidya  Před rokem +1

      I am really sorry @@nahuel3256 I would not be able to solve this issue due to my limited knowledge with windows os, I am more of a linux user. But I will pin this comment hoping someone from community will be able to help you out with this.

    • @nahuel3256
      @nahuel3256 Před rokem +1

      @@AbIoTsVidya No worries, thanks a lot anyways!

    • @imrank340
      @imrank340 Před rokem

      You are dickhead! Channel making video's for OS is Ubuntu! while you discussing issues for Window-10

  • @scooterb4185
    @scooterb4185 Před 2 lety +4

    I am new to the ESP32 and VS Code environment. I have viewed a dozen or so "getting started" videos and this one by far has been the most helpful. I am waiting eagerly for your next video. Thanks!

    • @AbIoTsVidya
      @AbIoTsVidya  Před 2 lety

      Thank you, for your response 🤩 keep supporting us.

  • @vigneshs6232
    @vigneshs6232 Před 2 lety +3

    After searching so many videos and websites , I get clear explanation and correct output by following your video in ESP32....Thankyou...

    • @AbIoTsVidya
      @AbIoTsVidya  Před 2 lety +1

      Thank you for response....your response is what motivates us.

  • @husam2761
    @husam2761 Před 2 lety +1

    CZcams algorithm is getting way better rn, i can't believe i found your channel, this video is exactly what i needed in the right time, keep the amazing job ma man ❤

    • @AbIoTsVidya
      @AbIoTsVidya  Před 2 lety +1

      Thank you, for your response 🤩 keep supporting us.

  • @DaveDickens
    @DaveDickens Před 2 lety +1

    Excellent video, this has really helped me get started I will be tuning in for the series. Thank you.

    • @AbIoTsVidya
      @AbIoTsVidya  Před 2 lety

      Thank you, for your response 🤩 keep supporting us.

  • @dharmikbhavani7272
    @dharmikbhavani7272 Před 2 lety +6

    After a long I got a perfect video to start learning ESP-IDF, thank you a lot Suhas and waiting for your next video.
    Good luck.

    • @AbIoTsVidya
      @AbIoTsVidya  Před 2 lety

      Thank you Dharmik Bhavani for your response 🤩 keep supporting us. Will try my best to provide quality content.

  • @boyceschrack2537
    @boyceschrack2537 Před 2 lety +1

    Thank you for doing this video. It’s the most helpful that I’ve found.

    • @AbIoTsVidya
      @AbIoTsVidya  Před 2 lety

      Hi Boyce Schrack, thank you for your response. Your feedback is what keeps us motivated.
      We are working on many more interesting videos and will be uploading it soon, sorry for the delay in uploading more videos.

  • @sowdhaminiramya2298
    @sowdhaminiramya2298 Před 3 lety +1

    All the very best Suhas❤️ keep going!!😘

  • @akulsinha1247
    @akulsinha1247 Před 2 lety +1

    Thanks, man. This was a big help.

    • @AbIoTsVidya
      @AbIoTsVidya  Před 2 lety

      Thank you, for your response 🤩 keep supporting us.

  • @sunilbhat1185
    @sunilbhat1185 Před 3 lety

    Was indeed very helpful!!! Thank you....

    • @AbIoTsVidya
      @AbIoTsVidya  Před 3 lety

      Thank you for your response 🤩 keep supporting us...

  • @christopherlyons7613
    @christopherlyons7613 Před 2 lety +1

    Couple questions. I see that you've only produced 2 videos regarding the ESP32. Are you planning any more?
    What is the benefit of using Espressif IDF as the framework vs Arduino? Guessing you have more control using IDF but at least for getting started seems like it's simpler to use Arduino and the common Setup() & Loop() methods. Can you provide some info on why it's worth using IDF vs Arduino? What type of things does IDF allow that Arduino doesn't? Appreciate any help. Thanks.

    • @AbIoTsVidya
      @AbIoTsVidya  Před 2 lety +1

      Hi Christopher, Thank you for your response 😊....
      Yes I am working on some new videos will be uploading very soon.
      In simple words if you are working on a hobby project go for arduino but if you are working on a production quality build go for esp idf.

    • @AbIoTsVidya
      @AbIoTsVidya  Před 2 lety +1

      The main disadvantage of arduino is that it works on the concept of super loop. If u have many tasks then It will lead to starvation.....on other hand in esp idf you can use the full power of FreeRTOS.

  • @fischkopp8865
    @fischkopp8865 Před 2 lety +5

    Thanks for the great Video. Very informative. By the way. My arrows key did not work in the Menuconfig. If this is the case for anyone else: You can use "J" and "K" instead :)

    • @AbIoTsVidya
      @AbIoTsVidya  Před 2 lety

      Thank you Fisch Kopp for your response 🤩 keep supporting us. Will try my best to provide quality content.

  • @bennguyen1313
    @bennguyen1313 Před rokem +1

    Regarding installing EspressIf support, not sure the difference, but their official github documentation recommends to install the Espressif Extension first, and from there that will install ESP-IDF. Have you tried that way (instead of installing IDF via the PlatformIo Extension)?
    For example, I installed VSCode, PlatformIO, and the EsspressIf extension, but when I run their extension and select Express install, it has an error saying about an invalid IDF (of which I don't have)!

    • @AbIoTsVidya
      @AbIoTsVidya  Před rokem

      Yes we need to first install the espidf extension from pio.
      I think you have installed esp idf extension from vscode, you need to install it from pio only.
      Though you can use official espidf vscode extension aswell. Remember pio espidf extension and vscode espidf extension are not the same.

  • @debasishtahbildar9603
    @debasishtahbildar9603 Před 2 lety +1

    Waiting for the rest... Please upload regularly Sir

    • @AbIoTsVidya
      @AbIoTsVidya  Před 2 lety

      *I am sorry Debasish,* I was held up with some personal work and could not focus much on creating the content. However now as everything got sorted out, I am working on releasing some interesting stuff very soon.
      Keep supporting us.

  • @khoinguyengia8946
    @khoinguyengia8946 Před 2 lety +1

    waiting for your next video.

    • @AbIoTsVidya
      @AbIoTsVidya  Před 2 lety +1

      I am sorry Khoi Nguyen Gia, I was held up with some personal work and could not focus much on creating the content. However now as everything got sorted out, I am working on releasing some interesting stuff very soon.
      Keep supporting us.

  • @behnkethomas9724
    @behnkethomas9724 Před 2 lety +1

    Thanks for this detailed vidio. I have followed your instruction. But my compiling process takes a very long time (several minutes) because a lot of files are also compiled in ".pio\build\esp32dev\esp32\....." I cant see this in your video. May i have wrong properties? Do you have an idea what's my issue ?

    • @AbIoTsVidya
      @AbIoTsVidya  Před 2 lety

      Hi Behnke Thomas, thank you for your response.
      It may be because its doing clean build everytime. Its deleting all the build files from cache and re-building everything everytime.

  • @DepechLyot
    @DepechLyot Před rokem +1

    Nice video! But i guess the #define directive do not use flash memory even though it is global.

  • @yahmk3978
    @yahmk3978 Před 2 lety +1

    Thank you!

    • @AbIoTsVidya
      @AbIoTsVidya  Před 2 lety

      Thank you Yah Mk for your response 🤩 keep supporting us. Will try my best to provide quality content.

  • @varshabv6073
    @varshabv6073 Před 3 lety +1

    All the best Suhas😁

  • @XxManagedxX
    @XxManagedxX Před 3 lety +2

    Excellent video. I like your teaching style. Can you cover how to add a custom board? We've created a custom board based which uses a esp32-wroom-32 module. How do I define this board and have it appear in the Board list?

    • @AbIoTsVidya
      @AbIoTsVidya  Před 3 lety

      Thank you for your response 🤩 keep supporting us. Sure david I will definitely try to make a video on how to define a custom board & make it appear in board list

    • @XxManagedxX
      @XxManagedxX Před 3 lety

      @@AbIoTsVidya That's awesome. Part of the trouble I ran into while trying to add my custom board is understanding where all the JSON fields come from. Is there some reference doc that list these and what each of them means? It seems it's more compiles (ESP-IDF) related and not platformio related. Yet, platformio has a dedicated page for it but minimum explanation about the fields. In other words if I didn't have the existing examples to copy from I would never be able to make a JSON file from scratch.

  • @mathieusan
    @mathieusan Před 2 lety +1

    I was hoping for more.. For example I am not sure how to use the c++ std::string classes as this platform io thing seem to accept only c libraries

    • @AbIoTsVidya
      @AbIoTsVidya  Před 2 lety +1

      Thank you for your response Mat.
      I will make sure I explain those features in upcoming videos.

  • @kaczkawil1
    @kaczkawil1 Před 2 lety +1

    Where are other videos? U rock man

    • @AbIoTsVidya
      @AbIoTsVidya  Před 2 lety +1

      Thank you very much for your response. 😍 In next two days I will be releasing the next video which is GPIO basics. Sorry for delay....will be uploading videos frequently from now on.

    • @kaczkawil1
      @kaczkawil1 Před 2 lety +1

      @@AbIoTsVidya glad to hear that! God speed
      Also can you cover a Little bit of esp32-cam, stuff like WiFi streaming ect?

    • @AbIoTsVidya
      @AbIoTsVidya  Před 2 lety +1

      Sure i have planned few videos on esp- prog for development and debugging and also esp 32 cam will cover it soon.👍😊

    • @kaczkawil1
      @kaczkawil1 Před 2 lety +2

      @@AbIoTsVidya great! Cant wait C:

  • @lucasexequielibanez1832
    @lucasexequielibanez1832 Před 2 lety +1

    Hi bro! thanks this video for me are very useful. I tried to do the same with my visual studio code but i can´t because i have a problem with my environment and i can´t fix it yet. Can you help me?

    • @AbIoTsVidya
      @AbIoTsVidya  Před 2 lety

      Thank you very much Iucas. Your feedback is what keeps us motivated. We are working on some new videos and will be uploading it soon.

    • @AbIoTsVidya
      @AbIoTsVidya  Před 2 lety

      Can you give a little more information like which operating system you are using, what is the exact error message u see...

  • @peterdirnhofer6777
    @peterdirnhofer6777 Před 2 lety +1

    Thank You !!!
    In Minute 16:32 you show RunMenuconfig. I cannot find it

    • @AbIoTsVidya
      @AbIoTsVidya  Před rokem

      Did you open the project in platform io ?

  • @tablatronix
    @tablatronix Před 2 lety +1

    Anyone know if they are working on DFU support?

  • @stefantapavica5180
    @stefantapavica5180 Před rokem +1

    When i click on Run Menuconfig and after configurtaion opens i can't move up and down. Which button you use to go from SDK tool configuration to Component config?

    • @AbIoTsVidya
      @AbIoTsVidya  Před rokem +1

      You can try using w and s keyword

    • @stefantapavica5180
      @stefantapavica5180 Před rokem +1

      @@AbIoTsVidya It doesn't work either

    • @AbIoTsVidya
      @AbIoTsVidya  Před rokem

      Few of my viewers have said J and K keywords worked for them, for the top and down movements....you can try it aswell.

  • @toubeexu7244
    @toubeexu7244 Před 2 lety +1

    How to use platformio esp32 s2 for arduino

    • @AbIoTsVidya
      @AbIoTsVidya  Před 2 lety

      Hi toubee, there is library called arduino-esp32 You can try this. github.com/espressif/arduino-esp32
      But these two are totally different, esp32 is dual core powerful device, where as Arduino is single core not so powerful device. And the ESP-IDF framework is customised to work for dual core and use the full power of the dual core, like this there are many advantages of using ESP 32.
      I would suggest if you want to work on ESP-IDF use esp32 series hardware do not use Arduino board.

  • @toubeexu7244
    @toubeexu7244 Před 2 lety +1

    support arduino?

    • @AbIoTsVidya
      @AbIoTsVidya  Před 2 lety

      Do you want to know if ESP-IDF supports Arduino?

  • @webseries9482
    @webseries9482 Před 2 lety +1

    Make 2nd video

    • @AbIoTsVidya
      @AbIoTsVidya  Před 2 lety

      I was held up with some personal work and could not focus much on creating the content. However now as everything got sorted out, I am working on releasing some interesting stuff very soon.
      Keep supporting us.

  • @hashanmadusanka6128
    @hashanmadusanka6128 Před 2 lety +1

    where is the 2nd video

    • @settisa604
      @settisa604 Před 2 lety

      i guess its deleted ..

    • @AbIoTsVidya
      @AbIoTsVidya  Před 2 lety

      Hi Hashan Madusanka, we are working on new videos will be uploading it soon. Sorry for delay.

  • @waka7377
    @waka7377 Před rokem

    "Could not initialize project" HELP

    • @AbIoTsVidya
      @AbIoTsVidya  Před rokem +1

      Could you elaborate, please, or perhaps share the entire error message

    • @waka7377
      @waka7377 Před rokem

      @@AbIoTsVidya the problem occurs when selecting "espresiff iot development framework". PIO Core Call Error: "The current working directory /home/demiiiurgue/Documents/PlatformIO/Projects/queso will be used for the project.

      The next files/directories have been created in /home/demiiiurgue/Documents/PlatformIO/Projects/queso
      include - Put project header files here
      lib - Put here project specific (private) libraries
      src - Put project source files here
      platformio.ini - Project Configuration File
      Resolving esp32dev dependencies...
      Already up-to-date.
      Updating metadata for the vscode IDE...


      Error: Processing esp32dev (platform: espressif32; board: esp32dev; framework: espidf)
      --------------------------------------------------------------------------------
      Verbose mode can be enabled via `-v, --verbose` option
      CONFIGURATION: docs.platformio.org/page/boards/espressif32/esp32dev.html
      PLATFORM: Espressif 32 (6.1.0) > Espressif ESP32 Dev Module
      HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
      DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
      PACKAGES:
      - framework-espidf @ 3.50001.0 (5.0.1)
      - tool-cmake @ 3.16.4
      - tool-esptoolpy @ 1.40500.0 (4.5.0)
      - tool-ninja @ 1.7.1
      - toolchain-esp32ulp @ 1.23500.220830 (2.35.0)
      - toolchain-xtensa-esp32 @ 11.2.0+2022r1
      /home/demiiiurgue/.platformio/penv/.espidf-5.0.1/bin/python: No module named pip
      CalledProcessError: Command '['/home/demiiiurgue/.platformio/penv/.espidf-5.0.1/bin/python', '-m', 'pip', 'list', '--format=json', '--disable-pip-version-check']' returned non-zero exit status 1.:
      File \"/home/demiiiurgue/.platformio/penv/lib/python3.10/site-packages/platformio/builder/main.py\", line 187:
      env.SConscript(\"$BUILD_SCRIPT\")
      File \"/home/demiiiurgue/.platformio/packages/tool-scons/scons-local-4.4.0/SCons/Script/SConscript.py\", line 597:
      return _SConscript(self.fs, *files, **subst_kw)
      File \"/home/demiiiurgue/.platformio/packages/tool-scons/scons-local-4.4.0/SCons/Script/SConscript.py\", line 285:
      exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
      File \"/home/demiiiurgue/.platformio/platforms/espressif32/builder/main.py\", line 312:
      target_elf = env.BuildProgram()
      File \"/home/demiiiurgue/.platformio/packages/tool-scons/scons-local-4.4.0/SCons/Util.py\", line 737:
      return self.method(*nargs, **kwargs)
      File \"/home/demiiiurgue/.platformio/penv/lib/python3.10/site-packages/platformio/builder/tools/piobuild.py\", line 60:
      env.ProcessProgramDeps()
      File \"/home/demiiiurgue/.platformio/packages/tool-scons/scons-local-4.4.0/SCons/Util.py\", line 737:
      return self.method(*nargs, **kwargs)
      File \"/home/demiiiurgue/.platformio/penv/lib/python3.10/site-packages/platformio/builder/tools/piobuild.py\", line 120:
      env.BuildFrameworks(env.get(\"PIOFRAMEWORK\"))
      File \"/home/demiiiurgue/.platformio/packages/tool-scons/scons-local-4.4.0/SCons/Util.py\", line 737:
      return self.method(*nargs, **kwargs)
      File \"/home/demiiiurgue/.platformio/penv/lib/python3.10/site-packages/platformio/builder/tools/piobuild.py\", line 331:
      SConscript(env.GetFrameworkScript(name), exports=\"env\")
      File \"/home/demiiiurgue/.platformio/packages/tool-scons/scons-local-4.4.0/SCons/Script/SConscript.py\", line 660:
      return method(*args, **kw)
      File \"/home/demiiiurgue/.platformio/packages/tool-scons/scons-local-4.4.0/SCons/Script/SConscript.py\", line 597:
      return _SConscript(self.fs, *files, **subst_kw)
      File \"/home/demiiiurgue/.platformio/packages/tool-scons/scons-local-4.4.0/SCons/Script/SConscript.py\", line 285:
      exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
      File \"/home/demiiiurgue/.platformio/platforms/espressif32/builder/frameworks/espidf.py\", line 1190:
      install_python_deps()
      File \"/home/demiiiurgue/.platformio/platforms/espressif32/builder/frameworks/espidf.py\", line 1099:
      installed_packages = _get_installed_pip_packages(python_exe_path)
      File \"/home/demiiiurgue/.platformio/platforms/espressif32/builder/frameworks/espidf.py\", line 1065:
      pip_output = subprocess.check_output(
      File \"/usr/lib/python3.10/subprocess.py\", line 420:
      return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
      File \"/usr/lib/python3.10/subprocess.py\", line 524:
      raise CalledProcessError(retcode, process.args,
      ========================== [FAILED] Took 1.21 seconds =========================="

  • @frescobaldobeccalossi9227

    not for newbies (of 35 years or more of hardware and firmware development). sorry, i quit

  • @systemofapwne
    @systemofapwne Před 2 lety +1

    Why isn't there already a meme on the internet, making fun of youtube-tutorials with silent voice-over and ear-raping intro music? /sarcasm. Please adjust & normalize your audio in post-processing to make your videos even greater than they are right now :)

    • @AbIoTsVidya
      @AbIoTsVidya  Před 2 lety

      Sorry for any inconvenience caused. I am new to this and since its the beginning, I cannot afford expensive licences and devices, I have given my best to provide a quality content with all I have. Keep supporting us, will try our best to improve.

  • @snivesz32
    @snivesz32 Před 2 lety +1

    Please practice speaking without saying “Uhh”, good luck with your channel.

    • @AbIoTsVidya
      @AbIoTsVidya  Před 2 lety

      Sure Snivesz32. Many viewers have informed me about this😀, i am trying my best to improve it.
      Thank you for your feedback. I will try my best to provide quality contents.

  • @fredflintstone8048
    @fredflintstone8048 Před 2 lety +1

    Please stop saying 'ahhh' and 'umm' between words in your presentation. You say it at least once in every sentence, and sometimes several times in the same sentence. It's a very bad habit and infuriating to have to listen to. Don't feel like you have to continuously make sounds. Don't worry, no one will interrupt you if you remain silent between your thoughts and the meaningful things you have to say.