PlatformIO Tutorial for Arduino and ESP - First Steps with Visual Studio Code

Sdílet
Vložit
  • čas přidán 30. 06. 2024
  • The Arduino IDE can do nothing! And that is good! Why, I explain in the video. The PlatformIO extension for Visual Studio Code is a free alternative to load code on your Arduino, ESP or similar microcontroller. I show you how to install the free Visual Studio Code first and add the free PlatformIO extension.
    PlatformIO now supports more than 900 microcontroller boards, over 35 development platforms and over 20 frameworks - including the Arduino framework, of course.
    ʕ•̫͡•ʕ*̫͡*ʕ•͓͡•ʔ-̫͡-ʕ•̫͡•ʔ*̫͡*ʔ-̫͡-ʔʕ•̫͡•ʕ*̫͡*ʕ•͓͡•ʔ-̫͡-ʕ•̫͡•ʔ*̫͡*ʔ-̫͡-ʔʕ•̫͡•ʕ*̫͡*ʕ•͓͡•ʔ-̫͡-ʕ•̫͡•ʔ
    0:00 Intro
    1:22 Visual Studio Download
    1:51 PlatformIO add-on installation
    2:20 New Project for Arduino
    3:04 Structure of a PlatformIO Project
    3:46 main.cpp and Arduino.h Header
    4:29 PlatformIO Buttons
    6:06 Devices Section
    6:52 New Project for ESP32
    7:35 Fix USB-Port Upload Problems
    9:05 Declare Functions
    10:35 Advantages Over Arduino-IDE
    13:03 Conclusion & Outro
    ʕ•̫͡•ʕ*̫͡*ʕ•͓͡•ʔ-̫͡-ʕ•̫͡•ʔ*̫͡*ʔ-̫͡-ʔʕ•̫͡•ʕ*̫͡*ʕ•͓͡•ʔ-̫͡-ʕ•̫͡•ʔ*̫͡*ʔ-̫͡-ʔʕ•̫͡•ʕ*̫͡*ʕ•͓͡•ʔ-̫͡-ʕ•̫͡•ʔ
    Because PlatformIO runs as an extension in Visual Studio Code, you automatically get all the powerful features of the Visual Studio Code development environment at your fingertips. And that increases the fun of developing definitely.
    However, when working with PlatformIO, you have to take care of a few things that automatically happened in the background in the Arduino IDE. I'll go over these hurdles, also show you how to deal with USB port problems when PlatformIO doesn't use the right port right away. And we test the whole thing once with an Arduino UNO board and an ESP32.
    Write me in the comments what you think about PlatformIO. Or maybe you know another alternative to the Arduino IDE? Let me know.
    Related Videos Links:
    Arduino VS ESP: • Arduino vs ESP32 - Whi...
    Software Links:
    code.visualstudio.com/
    platformio.org/
    www.doxygen.nl/manual/command...
    Tools/Components from the Video*:
    * geni.us/UQaxZM - Arduino UNO Starter Set
    * geni.us/5P72 - Arduino UNO
    * geni.us/08mKhC4 - ESP32
    * geni.us/BxaPyZm - ESP8266
    * geni.us/yNd9 - Jumper Cables
    * geni.us/YDdtC - Breadboard
    * geni.us/ZE1vp9 - LEDs Set
    * These links are affiliate links. The offers do not come from me, but for the reference I do receive a, if a purchase takes place. However, there are no additional costs for you!
    So if you click and buy, you support this channel - completely free of charge for you.
    Thank you - it helps to keep this channel stay alive!
    ╔══╦╗════╔╗═╔╗╔╗
    ╚╗╔╣╚╦═╦═╣╚╗║╚╝╠═╦╦╗
    ═║║║║║╬║║║╩║╚╗╔╣║║║║
    ═╚╝╚╩╩╩╩╩╩╩╝═╚╝╚═╩═╝
    And don't forget: Thumbs up, subscribe and activate bell :)
  • Věda a technologie

Komentáře • 45

  • @JustBambiThings
    @JustBambiThings Před měsícem

    You just saved my hair! I could not figure out why codes were not working from so many .ino files. Your description about the declarations has just saved me! Thank you so much!

    • @raydiy8323
      @raydiy8323  Před měsícem

      Glad I saved your hair 😅 You're very welcome.

  • @beachdancer
    @beachdancer Před rokem +3

    When working on an idea I have found that online Arduino simulators are faster than compiling and uploading to an actual microcontroller.
    My impression of PlatformIO and VSC are that for the new user there is very little easy to find and easy to understand guidance. Same for c++. Basic beginning questions aren't catered for by experts because they don't recognise that these kinds of questions exist. I have found that CZcams videos are a better source for beginners than website reference documents.

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

    Man don't stop please... your teaching and talking style is awesome! Much love from Tanzania

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

    Double "WOW!!! Awesome", that's what I usually start out with when I really get what I was looking for and needed. Clear, concise, excellent choice of the material covered, I'm good to jump in now.

  • @beachdancer
    @beachdancer Před rokem +1

    Coding in c++ (which many Arduino hobbyists don't know they are doing) I stuggled to find out how to handle strings. I learnt that c++ doesn't have strings as a basic type and that using their library uses reseources that I didn't need. The basic type is char. But how to handle them? Hours of searching for answers to basic questions. I am reminded that most of the reference documentation outside of Arduino is written by experts for experts. Very little is written for the hobbyist. Most experts can't even imagine what questions a hobbyist would ask, so they don't answer them.

  • @jamesedinger4956
    @jamesedinger4956 Před rokem +1

    Hope to hear more from you...great material and delivery style.

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

    WOW!!! Awesome coverage of this subject! Please continue! You're an awesome instructor and I hope you will continue expanding your English channel otherwise I'm going to be forced to lean German! Until then....I'm heading over to your German Channel right now because I've got to learn more! So AWESOME!!!

  • @johnnyr1720
    @johnnyr1720 Před rokem

    Seriously, it is very easy to watch and listen to you, you seem to have that 'thing' great teachers have. Please consider making more videos realting to Arduino / ESP 32.

  • @alexchiosso221
    @alexchiosso221 Před 2 lety

    Yes you did a good job.... :-)
    Even for an almost hold man as I am your way to explain technical things is clear.
    You have now a new subscriber.
    I hope you are still "alive" for this channel.

  • @user-xh9cj7in3p
    @user-xh9cj7in3p Před 5 měsíci

    Thanks for producing a clear, understanable introduction to the Arduino and ESP on the PlatformIO. Many of the videos I've come across either are hard to understand the author, or, to fast, or not enough detail. Your instructional pace is perfect.

  • @gordsh1
    @gordsh1 Před rokem +1

    Loved the video. You have a new subscriber. Good Job and thanks very much.

  • @martinmaters
    @martinmaters Před 4 měsíci

    Not clumsy at all, but extremely helpful.
    I used VSC for other projects, but still used the Arduino IDE for my ESP32 projects. And indeed it is no fun at all to use the Arduino IDE for lager projects... as of today I'll use PlatformIO!!!
    Now I need to figure out how to configure and use OTA provisioning and I'm ready to go!

  • @shimono992
    @shimono992 Před 4 měsíci

    incredible video! thank you so much for explaining it all really well!

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

    Good to know you are using spaces instead of tabs as the indentation :) and Thanks for your nice video. After watching the video, I got few questions: 1. Did you 3d printed a mouse? I am wondering the mouse you using in the video. 2. What is the c++ version platformIO is using, if it uses c++11 is there a way I could upgrade to c++20? Last thing is there is another useful shortcut in VSC, is the Alt+o which allowing you jump between header and cpp files~

  • @moinshaikh6684
    @moinshaikh6684 Před rokem

    Very nice and honesty explained tips and tricks

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

    Great! Thx on tutorial :)

    • @raydiyde
      @raydiyde Před 2 lety

      Thank you. You're very welcome! And congrats: very first comment on this channel :D

  • @luisfernandolebrando7677

    thanks, useful indeed. keep it goin.

  • @YigalBZ
    @YigalBZ Před rokem

    Thanks for the good video. Any idea how to add a class to the workspace? not to a specific project?

  • @minhluan20307
    @minhluan20307 Před rokem +1

    Thanks!

  • @4SquareHI
    @4SquareHI Před 2 lety +1

    Very good video! I'm struggling trying to find someone to show how to use secrets in platform IO to hide credentials used like for WIFI authentication from the main program. Maybe this could be an idea for a future video.

  • @beachdancer
    @beachdancer Před rokem

    When I was programming in PHP I found an excellent online reference with each command hyperlinked to related details and other options. I haven't found an accessible version of this for C++. Also, existing C++ docs don't include the Arduino environment so no mention of Serial.print or other Arduino conventions. (Things that Arduino simplifies or works secretly in the background).

  • @shelton311
    @shelton311 Před 2 lety

    Good video! What about arduino libraries ? How do we install them?

  • @riccardoanzil5998
    @riccardoanzil5998 Před 2 lety

    Hi :)
    I am considering using PlatformIO as a replacement for my MPLAB IDE for PIC32 micros. This is for coding of our custom PCBs (NOT standard dev kits).
    Few quick questions:
    1) Is it possible to replace the ENTIRE MPLAB IDE with PlatformIO?
    2) How easy (or not) is it to set it up specifically for the PIC32 family?
    3) is there anything that MPLAB does that PlatformIO does not and/or that I should be aware of if switching over?
    Thank you :)

    • @raydiy8323
      @raydiy8323  Před 2 lety

      Hey Riccardo! Thank you for your question. I'm not familiar with the MPLAB IDE. At least I have found the PlatformIO docs for PIC32. There are some examples and a list of supported boards. docs.platformio.org/en/latest/platforms/microchippic32.html
      As far as I have read the MPLAB IDE is not much fun to work with. Hope this helps.

    • @riccardoanzil5998
      @riccardoanzil5998 Před 2 lety

      @@raydiy8323 that's why I am interested in possibly using PlatformIO. Thank you

  • @KaloyanDobrev
    @KaloyanDobrev Před 5 měsíci

    How are the example codes from Arduino IDE loaded into PlatformIO project?

  • @Acho087
    @Acho087 Před 2 lety

    If you want to view a serial plotter, how would you do it?

  • @minhlenguyentuong4158
    @minhlenguyentuong4158 Před 9 měsíci

    I'm a beginner and I've got so much information from this video, but I have a problem which is that I can not find any upload port in the "Devices" session. Can you suggest some way that i can fix it? Thank you!!

  • @beachdancer
    @beachdancer Před rokem +1

    Using VSC/PlatformIO I spent hours trying to find out how to put some of the code into a separate tab to remove some of the clutter. It is odd that when coding the "intellisense" support is fantastic, but when trying to do something like open a new tab there is no guidance.
    More on using VSC & PlatformIO could be useful.

    • @colormaker5070
      @colormaker5070 Před rokem

      Did you ever find a good tutorial on tab use in platformio?

  • @Guishan_Lingyou
    @Guishan_Lingyou Před 7 měsíci

    This is very helpful. Looks like you have stopped uploading videos. I will subscribe anyway in case you decide to make a comeback.

  • @MrDiederikDuck
    @MrDiederikDuck Před 2 lety

    I like platform io, but I see some serious issues too. I tried to import ethernet.h and wifi h. While compiling Platform io started to throw tantrums about not finding underlaying libraries. Did the same with Arduino Ide and presto, it compiled it smoothly.

  • @quaking2993
    @quaking2993 Před 2 lety

    can you do esp32 s2 with platformio?

    • @raydiy8323
      @raydiy8323  Před 2 lety

      Hi @Quaking! Pretty sure you can do. Look at this documentation page of Platformio: docs.platformio.org/en/latest/boards/espressif32/esp32-s2-saola-1.html
      It seems you have to look for the board named esp32-s2-saola-1.

  • @ILUMINATBender
    @ILUMINATBender Před 2 lety

    hi, your video helped a lot with arduino uno, but with esp32doit-devkit-v1, I can't figure it out in any way, when connecting it to my mac, it reports /dev/cu.usbserial-0001 after I try to refresh the page with devices and nothing happens if you could somehow tell me what to do, I would be very glad hello from far kazakhstan

  • @VoeViking
    @VoeViking Před rokem

    You sound like Patrick Stewart.

    • @raydiy8323
      @raydiy8323  Před rokem

      Since I'm a big Star Trek fan I would take that as a compliment :)