#264

Поделиться
HTML-код
  • Опубликовано: 24 авг 2024

Комментарии • 916

  • @dirk-janfaber
    @dirk-janfaber 5 лет назад +251

    Instead of moving the whole function plus its content to the top of the sketch, you can also only move the declaration (`void showLED(int pin, int delayPeriod, bool ledStatus);` (line 17 + semicolon)) to the top of the sketch and leave the function with its content below in the sketch. This can by handy if you have functions calling each other and it is hard to get the order of the functions right. Just declare them all at the top and implement them later.

    • @AndreasSpiess
      @AndreasSpiess  5 лет назад +34

      You are right. I did not want to make it too complicated.

    • @SebastienChedalBornu
      @SebastienChedalBornu 5 лет назад +40

      @@AndreasSpiess or the good way you put all the prototypes in a .h and include it after the include arduino.

    • @wassfila
      @wassfila 5 лет назад +11

      @@AndreasSpiess You are right, moving out from Arduino IDE is already a huge step for beginners learning programming. Forward declarations and header libraries creations are a separate topic related to c++ learning.

    • @stefankuhnen6305
      @stefankuhnen6305 5 лет назад +21

      Having programmed C++ since 1988 I find it odd behavior that calling functions before declaring them is allowed in the arduino IDE.

    • @sethrd999
      @sethrd999 5 лет назад +4

      @@AndreasSpiess This is not complicated this has been true for C/Cpp from the beginning.

  • @crckdns
    @crckdns 5 лет назад +157

    Sidenote: for VSCode with PlatformIO you don't need to have arduino IDE installed.
    Finally a big RUclipsr suggests PlatformIO with VSCode to the beginners, now they can start with a real and powerful IDE.
    Thanks!

    • @crckdns
      @crckdns 5 лет назад +12

      Sidenote2: the forced declaration of functions and variables before use is intended as it behaves like with "real" programs. It's just that ArduinoIDE was more forgivable.
      To avoid writing whole function before the loop.. just declare the function like you do with variables without the content.
      Simple " void showled(int pin, int displayperiod, bool ledstatus); " before loop. That's enough for the compiler to know. Then you can as usual put the whole function after the loop section.

    • @kluzz
      @kluzz 5 лет назад +30

      @@crckdns For added credit, reduce the clutter in main.cpp by moving your functions into separate .cpp files, place function declarations in separate .h files, include those in main.cpp, and you're well on your way to becoming a real C/C++ programmer. :) (And by "you", I mean whoever this is news to. I assume you know all this already.)

    • @crckdns
      @crckdns 5 лет назад +8

      @@kluzz pretty good point about the seperatation of code! But that's a thing most arduino coders never will touch sadly :(
      This would yet be a good topic to mention for Andreas next video 😸

    • @deangreenhough3479
      @deangreenhough3479 5 лет назад +3

      crckdns I agree, please Andreas show us🤭👀👀👀👀👀👀👀👀😉😉❣️

    • @Take5Instead4
      @Take5Instead4 5 лет назад +1

      I'm a little bit confused: Andreas installed a newer version of Arduino (1.8.9) over the older 1.8.5. BEFORE continuing with VSC and PlatformIO Why should he do this, if it is not needed?? Do PlatfomIO + VSC not work, if a the older Arduino 1.8.5 is already installed?

  • @BaronVonBiffo
    @BaronVonBiffo 5 лет назад +35

    Concise, precise, comprehensive, logical and entertaining too. Your videos really are in a league of their own.

    • @AndreasSpiess
      @AndreasSpiess  5 лет назад +3

      Thank you. You are too nice!

    • @AndersJackson
      @AndersJackson 5 лет назад +3

      @@AndreasSpiess no, he is precise, comprehensive and logical, like you. :-D

    • @cristiancruciani3603
      @cristiancruciani3603 3 года назад

      yes, you are right!!!. thanks Andrea!! a hug from Argentina!!

  • @kluzz
    @kluzz 5 лет назад +71

    When I first started working with the Arduino IDE, it felt like I was being transported back to the early 90s. Once PlatformIO appeared for VS Code (which I had been using for other things for years already), I was finally brought back to the present. There really hasn't been a good reason to use the Arduino IDE for quite some time.

    • @AndreasSpiess
      @AndreasSpiess  5 лет назад +21

      Still the Arduino IDE did a great job of simplifying programming for many beginners...

    • @TheBodgybrothers
      @TheBodgybrothers 5 лет назад +10

      Yeah, Arduino made micro controllers accessible to beginners. And huge kudos for that!

    • @kluzz
      @kluzz 5 лет назад +8

      @@AndreasSpiess Well, yes, but I would argue that having decent IDE and being beginner friendly are not two mutually exclusive goals.

    • @user-so2xd7pw9l
      @user-so2xd7pw9l 5 лет назад +1

      The error messages of arduino IDE a absolutely nonsense. I spent days debugging with arduino ide finally finding out that that i had a Japanese blank character between the lines:-(

    • @kluzz
      @kluzz 5 лет назад +2

      @@user-so2xd7pw9l In fairness, that's probably the compiler and not the IDE. I've been programming C/C++ for nigh on 25 years, and I still manage to get flummoxed by incomprehensible error messages from the various compilers.

  • @freepoet6737
    @freepoet6737 5 лет назад +25

    Instead of moving all functions to the head of the file, you can declare function prototypes,
    just add the function name declaration somewhere near the top of the file.
    void showLED(int pin, int delayPeriod, bool ledStatus); // function prototype
    This tells the compiler to expect the function declaration later,
    and keeps the flow of the code neater.

  • @sensesciencescenes7402
    @sensesciencescenes7402 5 лет назад +26

    Thanks for sparing your precious time in creating all your valuable videos Mr. Spiess. How do you manage to take time off? Isn't it hectic for you?

    • @AndreasSpiess
      @AndreasSpiess  5 лет назад +12

      This is my hobby. So there is no "must" ;-)

    • @Claudiu.
      @Claudiu. 5 лет назад +10

      Your teaching skills are something I wish more teachers would have. Your explanations are logical and this does come from you being passionate about it. I hope you'll continue doing what you like and share it with us!

  • @davepauljones
    @davepauljones 5 лет назад +2

    I have two large projects, one for Arduino Mega2560 the other for ESP8266, I have no problem with the Arduino IDE, I use alot of tabs, and use .h file to contain my structs and classes, they too are loaded into tabs, I do run out of tab space & have to scroll down, I have problems, when installing Arduino IDE onto other PC's / laptops, you have to remember which libraries you have used, but for me, I like the simplicity of the Arduino IDE, for programming micro controllers, it matches the simplicity of the 8 bit micro's, I don't like convoluted ways to set up the IDE, like visual micro, had problems with libraries & tabs, so went back to Arduino IDE, long story stort, stick with the Arduino IDE & maybe ask for additions, you all have a lot to thank Arduino for, I will stick with it, the original idea of simplicity, after all was what resurrected my interest in electronic after abandoning the PIC microchip in late 90's due to lack of available libraries, so I am greatfull to the Arduino & Massimo, check out my youtube channel if you want to see what can be acheived with Arduino IDE & Mega2560. >>> ruclips.net/user/davepauljones

    • @carltone
      @carltone 5 лет назад

      davepauljones the editor is primitive, try atom with plaformIO you'll change your mind. I have large projects multi tabs etc, as well having a real editor makes life so much easier, it's not BREIF which was the best IMO but it's infinitely superior to the Arduino IDE editor.

    • @davepauljones
      @davepauljones 5 лет назад

      Thanks Carl, I will try it, maybe I will need it, when working with ESP32 projects, thanks for reply.

  • @tonybell1597
    @tonybell1597 5 лет назад +2

    Thanks Andreas, the beauty of platform io is also the way you can write one piece of code, then, in the .ini file, create different "profiles" that allow you to compile the same code for several different boards..... It's a joy to use along with tons of community supported add ons.... Brilliant....

  • @g3i0r
    @g3i0r 5 лет назад +9

    Platformio is great. Especially because it is completely usable from the command line. That way, you are not bound by a specific IDE and can do developing and building with any editor you want (for example, I use Emacs). For larger projects, you can even build and test on a central server without a GUI.
    You hinted at it at the end, but I think it's worth to emphasise: With pio, you can have the same project run on many different boards (AVR-based, ESP8266, ESP32, ARM,...) and have all the settings for the different boards in the platformio.ini, so that a user only has to select the board and everything else is done automatically. The whole system is a true productivity booster. And best of all, it's open source.

    • @AndreasSpiess
      @AndreasSpiess  5 лет назад +1

      You are right. These separated environments for me are maybe the biggest advantage.

    • @wilfriedkopp4369
      @wilfriedkopp4369 5 лет назад

      I also like the fact you can do all from the command line. That makes integration with editors or IDEs very smooth. I got very good experience using SublimeText (you can replace with the editor of your choice). Also using IntelliJ, you can use the provided Ant script or map them to Gradle tasks. The main benefit of that is intégration with CI systems such as the Gitlab pipelines that now can rebuild Everytime you push a change.

  • @marcosmercado5648
    @marcosmercado5648 5 лет назад +3

    Very powerful tool that I did not know. I will play with it by migrating some of my simple projects first to learn it. As always, thanks for your excellent reviews!

    • @AndreasSpiess
      @AndreasSpiess  5 лет назад +1

      Maybe it is easier to start the new ones with it. That is what I will do.

  • @bobkinloch
    @bobkinloch 4 года назад

    I’m using ESP 01S board and I have used board = Espressif 8266 512 .. you have to unplug / plugin the Com port to make it work .... AND IT DOES WORK .... thanks for the brilliant video .

  • @NicholasIbarra01
    @NicholasIbarra01 3 года назад +1

    I wanted to learn more about PlatformIO and saw your video first, and I knew instantly that it was going to contain everything I neede do to know. Your videos really are informative, concise, and cover everything needed. You are like the teacher I wish I had during my computer science degree.

    • @AndreasSpiess
      @AndreasSpiess  3 года назад +1

      Thank you for your nice words! Welcome aboard the channel.

  • @VincentFischer
    @VincentFischer 5 лет назад +8

    ArduinoIDE text editor (some simple basic java swing text view without any native functions like touch scrolling, dpi scaling, ...) was always a joke if you ever used a Jetbrains IDE or something similar modern. Heck, even your basic linux terminal editor with syntax highlihting was more comfortable. Also I love how platformIO can be integrated in automated CI systems.

    • @akj7
      @akj7 5 лет назад

      Vincent Fischer, agreed. I prefer using Vim rather than Arduino IDE.

    • @VincentFischer
      @VincentFischer 5 лет назад

      @@akj7 If you don't ever plan to exit your editor thats a fine choice :P

    • @johnnielake
      @johnnielake 5 лет назад

      @@akj7 vsc has a vim extension. yay!

  • @YouGenom
    @YouGenom 5 лет назад +22

    IMPORTANT note here: installer comes with a non-open source license. Actually, this has been criticized as everywhere users see "open-source", where they finally lead to a package, which doesn't have open-source license. It also turns out to be by default MS collects telemetry data! Therefore, I suggest to use Atom, if you care about privacy and open-source. Another and not so easy option is to build vscode from source (it is on GitHub).

    • @ristomatti
      @ristomatti 5 лет назад +5

      ​@nearcz It might be easier to just disable sending it: code.visualstudio.com/docs/supporting/faq#_how-to-disable-telemetry-reporting

    • @YouGenom
      @YouGenom 5 лет назад

      @nearcz Yes, thanks for reminding it. I forgot to mention VS Codium.

    • @YouGenom
      @YouGenom 5 лет назад +3

      @@ristomatti Still, doesn't change the license issue and considering the distrust against Microsoft, it is in my opinion better to compile the source code or go for VS Codium.

    • @tin2001
      @tin2001 5 лет назад +3

      @@ristomatti
      Disable now... And have it automatically re-enable later with an update? I'll give that a hard pass.

    • @ristomatti
      @ristomatti 5 лет назад

      @@tin2001 It re-enables after each update even though its done in the config file? If so, that sounds like a bug that should be reported. Personally I haven't bothered setting it. I'll be able to use their great product for free, they can get my usage data as an exchange. I doubt I'll be seeing a lot of targeted ads based on my code.

  • @dalehorton7748
    @dalehorton7748 5 лет назад +1

    Last I looked into PlatformIO it was very early days, and the generally preferred option was to do everything on the command line and use your own editor. I tried this for a while, but it was just more cumbersome and using the "shitty" Arduino IDE was still more efficient for me. Thanks for making this video and getting me to try PlatformIO again, now with VSCode integration, i'm loving it!

    • @AndreasSpiess
      @AndreasSpiess  5 лет назад +1

      I tried it also a while ago and was disappointed. Now it seems to be more straightforward

  • @sanjaybhatikar
    @sanjaybhatikar 3 года назад

    I love PlatformIO. It has definitely made programming the Arduino family microcontrollers much easier. Thank you for introducing this IDE to makers.

    • @AndreasSpiess
      @AndreasSpiess  3 года назад +1

      You are welcome! Not everybody feels PIO is easier, but for sure more powerful!

  • @RomanKuechler
    @RomanKuechler 5 лет назад +11

    As good as PlatformIO & VCS may be, I personally wouldn't recommend it to a beginner, sorry:
    - Installation is much bigger and fatter and more complicated.
    - The mutual dependencies can increase.
    - The possibilities (of VCS) may be overwhelming or confusing for a beginner.
    - Most support and help sites (> 99% ?) assume that the Arduino IDE is used or do refer to it.
    - The Arduino IDE is small, light-wight and very easy. And it's even portable, if desired.
    I suggest that small and simple sketches, as they are normally done by beginners, are faster and easier to implement with the Arduino IDE. PlatformIO and VCS can come later ...

    • @tanux66
      @tanux66 5 лет назад

      Roman Kuechler totally agree with you. Moreover on Arduino ide is possible to see binary code and make ota update of firmware and data files i.e. on Esp8266.

    • @Ed19601
      @Ed19601 5 лет назад

      Fully agree

    • @efimovv
      @efimovv 5 лет назад

      @@tanux66 OTA updates in PlatformIO are seamless: just need to set upload_port in platformio.ini to IP or FQDN.

    • @user-so2xd7pw9l
      @user-so2xd7pw9l 5 лет назад

      Did you ever try to manage your code at github? I had many times mixed up my code by automatic file name changes from arduino IDE. I don't think this is beginner friendly!

    • @dalehorton7748
      @dalehorton7748 5 лет назад +3

      When people are just starting out, yes they want the quick reward of being able to hit upload and seeing a light blink, knowing that they did that. But at that time they're willing to learn new things and put in at least a little effort to getting everything working - they're already EXPECTING it to be difficult, and IMO PlatformIO is still very much easy enough to get started with and leave them pleasantly surprised at how easy the process can be.
      In the longer term, the Arduino IDE very often becomes a crutch. I've seen many users (including myself) stick with the Arduino IDE for far too long, just because 'It Works'. Sure they could put in the time & effort to learn the "proper" development tools for each platform (Atmel Studio, SW4STM32, etc), but this requires them to re-learn a whole lot for each platform's vendor specific way of doing things, have a much harder time finding ready to run code or importing libraries, and in the end doesn't actually gain them anything except a nicer editor. For most users, since they can already achieve all the same things with the Arduino IDE, the motivation to learn and use something new is much harder to come by, so its very common to see them give it a go, realise it's a lot of work for little to no gain, and jump straight back to the Arduino IDE.
      And thats without diving into the stuff the Arduino IDE actually makes MUCH harder. For example it's a very common issue for beginners to have a problem uploading a sketch to a non-Arduino board, have it fail, and have no idea why. Walking them through finding the preferences.txt file on their system and manually editing it to enable verbose build / upload so they can get an error message that makes any kind of sense is FAR more hassle than it should be.
      PlatformIO with VSCode I think strikes the perfect balance. It was a total breeze to install, The IDE is faster to open than the Arduino IDE, it still supports all the different platforms I may use (ATMega328, ATMega32u4, STM32F103, ESP8266, ESP32, etc) without even having to add extra board support URLs, the editor is a massive step up from the barely-better-than-notepad.exe offered by the Arduino IDE, it supports a wider array of upload methods meaning its much easier for beginners to start dabbling in using "real" hardware programmers instead of a serial bootloader, and the native dependency management / resolution is just brilliant.
      The last time I looked into PlatformIO it wasn't nearly as polished, i'm hugely thankful to Andreas for this video prompting me to take another look at it, and I will be recommending VSC+PlatformIO to beginners from now on.
      PS, it's VSC, VCS is something else entirely :P

  • @lodesmets9815
    @lodesmets9815 5 лет назад +4

    I use visual studio (the normal one) with visual micro addon (this allows you to program arduino boards).
    It even allows to put in breakpoints

    • @thesimbon
      @thesimbon 5 лет назад +2

      Same here, it is a more professional tool than other solutions.

    • @drinski6720
      @drinski6720 5 лет назад

      Can you write web address to "visual micro addon"

    • @thesimbon
      @thesimbon 5 лет назад

      @@drinski6720 just search it in the add-on page in visual studio

    • @Basement-Science
      @Basement-Science 5 лет назад +1

      Same. I had tried PlatformIO in Atom before, but had multiple issues with it.
      Visual micro works great.

    • @noweare1
      @noweare1 5 лет назад

      @@Basement-Science Same here. Issues I could not solve. I love Visual Micro.

  • @mickh3000
    @mickh3000 3 года назад

    Thank you Andreas. I moved to PlatformIO on VS Code after watching this video. I had wasted several days working (and failing) to get Eclipse fully operational on ESP8266. This is sooooo easy now and all in the one IDE, I can start to code the projects rather than fighting the IDE.

    • @AndreasSpiess
      @AndreasSpiess  3 года назад +1

      Glad it helped! I also tried and abandoned Eclipse a few years ago :-(

  • @CraftyOldGit
    @CraftyOldGit Год назад

    A wonderfully useful video which saved me many hours of frustration. The first time I looked at VSC & PlatformIO I didn't think I think the time it would take to find my way around it would be worthwhile. You showed me everything I need to know to get started in less than 20 minutes -- thank you.

  • @SebastienChedalBornu
    @SebastienChedalBornu 5 лет назад +3

    i tried arduino IDE 1 night only one, and i yeled at it because i was back in the beginning on 90's
    next day i foudn platformIO and now i do arduino stuff with a REAL editor with REAL programming rules, not crappy rules that could be even be designed for javascript.
    so electronics guy will have to code more correctly now :D

  • @christianmeinert8806
    @christianmeinert8806 5 лет назад +4

    You didn’t mention that by using vsc you can use the ide for many other languages like python, html, JavaScript and even openHAB Xtend. Just take a look in the extension library.
    If you get familiar with vsc you will have a “swiss army knife” for most coding tasks.
    As usual MS came late and took many good features from other projects do build their product but this time they made it open source (partly). Do you remember Bill saying “open source will kill the software industry”?
    BTW the github Integration is great and you can easily compare files and solve conflicts within the IDE.

    • @mtarquinio
      @mtarquinio 5 лет назад +2

      Visual Studio Code is great, and big community has growing around it.
      Pycom from Eindhoven has created a plugin for VS Code called pymakr that allow you to use it with MicroPython. Using it one can do most of the tasks you demo in the video with MicroPython. In that case the terminal is the interactive REPL where code can also be entered / executed line by line.
      Nice!

    • @johnnielake
      @johnnielake 5 лет назад

      VSCode also has a deal-making Vim extension.

    • @AndersJackson
      @AndersJackson 5 лет назад

      @@johnnielake no Emacs bindings, no no deal... :-)

  • @jeffmcclain
    @jeffmcclain 4 года назад

    Just got done installing Platformio for RaspberryPi 4 board, and setting it up was not easy to do from scratch without this guide (originally I followed this guide to VSC/PlatformIO in Windows10) and rewatching this guide and following for setup in RaspberryPi was just perfect. I wish I could give this another LIKE. So useful. Thank you again.

  • @garrypkeogh
    @garrypkeogh 5 лет назад

    An other of the "Classic Andreas Spiess" series of tutorials which shape and change the way people do things in this space. Well done Andreas and thank you once again!

  • @enjibkk6850
    @enjibkk6850 5 лет назад +3

    A lot of compelling arguments for platform.io, for me dependency management and board selection being the main ones. Will definitely try out next time

    • @AndreasSpiess
      @AndreasSpiess  5 лет назад

      You still can return. Not a lot is lost...

  • @andymouse
    @andymouse 5 лет назад +34

    This video has been an emotional train wreck for me, more than once I found myself with a lump in my throat and close to tears...……..To read so many comments by so many people giving the Arduino IDE a venomous Kicking like this......Have people no sense of shame ? that IDE gave so much and asked for NOTHING back !...……..poor little thing, I for one am gonna update my IDE every time one is available...…..whether I use it again or not.

    • @iansparkes3315
      @iansparkes3315 5 лет назад +3

      The Arduino IDE has benefits: It's really easy for people to get started with and it's very uncomplicated and bureaucratic - I still think it is an excellent "on-ramp" for people which simplifies away a lot of the trouble that comes with what is fundamentally a tough task. If you do serious things with it, eventually you will reach the limits for code maintainability, and at this point it's great to have an alternative.

    • @MatSmithLondon
      @MatSmithLondon 5 лет назад +9

      Seems strange to be emotionally connected to an IDE!

    • @jackhoffman6120
      @jackhoffman6120 3 года назад

      @@MatSmithLondon Quite normal if technology is your thing. Nikola Tesla was emotionally (romantically) connected to a pigeon, so it's not unusual for people in this forum to have these kind of feelings.

  • @somedude5414
    @somedude5414 3 года назад

    Thank you for going through the failures too and not just how to get it working. Those were much more informative.

    • @AndreasSpiess
      @AndreasSpiess  3 года назад

      You are right. We only learn from mistakes. No need to learn if you do no mistakes. Then either you are lazy or already a master ;-)

  • @molodez_tom
    @molodez_tom 4 года назад

    This video motivated me to switch from Arduino IDE to PlatformIO. And really it works well and brings me back to what I am used to as a "retired" software developer. I had some problems with the IDE and strange messages about libraries. Again your video helped me to find the right places in an instant. Thank you Andreas

  • @Tony770jr
    @Tony770jr 5 лет назад +5

    Can you demonstrate importing an existing ino project, with dependent libraries?

    • @ristomatti
      @ristomatti 5 лет назад +2

      This is not the best or recommended way to do it but if you want to keep it simple, it should be enough to create a new project in PlatformIO, copy the old Ino files into "src" folder and then copy the needed library folders from your Arduino libraries folder into "lib" folder under your PIO project.
      Another hacky way is to add your old Arduino libraries folder as an exrra library folder to your platformio.ino like this:
      lib_extra_dirs = /path/to/Arduino libraries
      I'm not sure how Windows paths should be defined though but I'm guessing it would be either
      lib_extra_dirs = c:\path\to\Arduino libraries ; or
      lib_extra_dirs = c:/path/to/Arduino libraries
      But if you do it like this you'll be missing the ability easily upgrade the libraries.

    • @AndersJackson
      @AndersJackson 5 лет назад

      @@ristomatti so, Arduino IDE still have something it is better at? Why you still should have Arduino IDE. ;-)

    • @AndreasSpiess
      @AndreasSpiess  5 лет назад +2

      I will not port my projects. I will only start new ones. Too much effort.

    • @ristomatti
      @ristomatti 5 лет назад

      @@AndersJackson I would like to hear how easy it would be to use libraries downloaded by PlatformIO directly in Arduino IDE. The video pretty much already had an answer to OP's question but I suggested an alternative way which might be simpler than hunting down some possibly obscure libraries again.

  • @Corgitronics
    @Corgitronics 5 лет назад +8

    PlatformIO is interesting. I hope you'll do a video on the debugger!

  • @Joachim_S
    @Joachim_S 5 лет назад +1

    Hi Andreas,
    as usual a top video. Since I have problems with the libraries of Bosch BME680, I switched to Platformio last week. -> no more problems.

  • @re.liable
    @re.liable 2 года назад

    I've been using the Arduino IDE for quite some time. I think it's now time I "grew up" and use a more advanced tool. Thank you for this vid. You and several other embedded electronics RUclipsrs have been a boon to my learning journey

  • @dariuszruminski8549
    @dariuszruminski8549 5 лет назад +5

    IMHO Visual Studio Code with platform IO is 100% better than Arduino IDE. It's more comfortable.

    • @LimbaZero
      @LimbaZero 5 лет назад

      VSC looks pretty nice. I still prefer Atmel Studio because of ICD.

    • @AndreasSpiess
      @AndreasSpiess  5 лет назад

      It is definitively more comfortable.

  • @ericBcreator
    @ericBcreator 5 лет назад +3

    It looks like a great alternative and seems to have a lot of advantages.
    But I don't like functions have to be defined before the setup and main loop, especially in longer projects.
    Can't you initialize the function in the header (like a variable) and define it later?

    • @steff3140
      @steff3140 5 лет назад +2

      Yes, you just have to write the function prototype before using the function. This prototype could be define in an external file (header) or before the 1st function (setup in Andreas example).
      The function prototype would be something like that :
      void my_function (int) ;

    • @ericBcreator
      @ericBcreator 5 лет назад

      @@steff3140 OK, great, time to give it a try then.

    • @superdau
      @superdau 5 лет назад +2

      What you get with platformio is essentially standard C++ behaviour. It is the Arduino IDE that hides that from you.

  • @tsbrownie
    @tsbrownie Год назад +1

    Really excellent outline/summary. I stopped playing with Arduino because of its many problems and am now thinking of getting back into it with platformio. Another difference between platformio and arduino ide is that platformio is more strict about proper C code, for example it won't let you get away with not having a return on a char or similar function.

    • @AndreasSpiess
      @AndreasSpiess  Год назад +1

      Cool that you try to get back into the "Arduino world" without the Arduino IDE!

  • @dozog
    @dozog 5 лет назад

    QUITE POSSIBLY YOUR MOST USEFUL VIDEO TO DATE
    Especially with slightly bigger projects, it really helps if you can "Go definition" and "Go declaration" and check the types of variables etc etc.
    Working with class variables is so much more intuitive. Trouble shooting and moving code around is so much easier.
    I have been using PlatformIO for about 3 months now, and every time i want to slightly modify some previous sketch, i move it to PlatformIO first and then modify it.
    It also works great to check out what goes on behind the curtain of third party libraries, because you can open the library .h and .cpp files right inside your project window.
    If you decide use make a library as a local library, you can easily modify the library to suit your own personal preference, without breaking any of your other code that uses the original version of that same library.
    The color schemes really give you insight into what you are doing.
    The only thing missing from the Arduino experience really, is a decent debugger. (even a very basic debugger in fact)
    THANK YOU SO MUCH FOR INTRODUCING THIS!!!

    • @AndreasSpiess
      @AndreasSpiess  4 года назад +1

      Maybe you watch ma video about inline debugging and platformIO?

    • @dozog
      @dozog 4 года назад

      @@AndreasSpiess You sir, are too kind.
      I have watched it, but at the time was not convinced it wasn't complicated.
      I remember there were some hardware options. (Banggood doesn't ship to my country recently)
      Maybe i will watch it again after a cup of coffee so my attention span is a bit better :-)
      Thank you again, you are a true resource of fresh ideas.

  • @ThomasHaberkorn
    @ThomasHaberkorn 5 лет назад +6

    online debugging is the holy grail-- please review

    • @user-so2xd7pw9l
      @user-so2xd7pw9l 5 лет назад +1

      Yes, please!

    • @AndreasSpiess
      @AndreasSpiess  5 лет назад +3

      We will see. I need some HW first...

    • @WaltSorensen
      @WaltSorensen 5 лет назад

      Here try my Repo as an example for low level CI testing with PlatformIO emulation and TravisCI
      github.com/photodude/G2MotorDriver

  • @pnroot
    @pnroot 5 лет назад +11

    Atom editor and PlatformIO works great and it stays opensource :-)

    • @superdau
      @superdau 5 лет назад +1

      Well, Atom (which I'm using myself) is essentially a Microsoft program as well. Atom is based on Electron (as is Visiual Studio Code). Atom and Electron are developed by github, which belongs to Microsoft. I doubt Atom will be axed, but I don't expect many resources to go into it compared to VSC in the future.

    • @anthonyshort8957
      @anthonyshort8957 5 лет назад

      VScode is open source too.

    • @sourekpetr
      @sourekpetr 5 лет назад

      But Atom is a little slow for me. :-(

    • @pnroot
      @pnroot 5 лет назад

      @@sourekpetr Slow LOL

    • @sourekpetr
      @sourekpetr 5 лет назад

      @@pnrootWhen you start app and the app is able to function after 2 minutes after you lanuch it, that is slow. Sorry...

  • @DeanMcGee
    @DeanMcGee 5 лет назад +2

    Another great video, as usual! I've been using PlatformIO for some time and love it. A video on local git integration as well as github for VSC/PlatformIO would be a good future topic.

    • @AndreasSpiess
      @AndreasSpiess  5 лет назад

      We will see. Maybe I include it in another video. I cannot do videos with too special content as it is only interesting for a few viewers and I disappoint the rest :-(

  • @HiWiFiDrones
    @HiWiFiDrones 5 лет назад +1

    Amazing, Andreas. I've recently moved to VSC for ASP Classic programming and had no idea that by installing this IO plugin, I'd be able to do Arduino Sketches.
    Thanks from Brazil, my far far away Swedish Accent friend! I kiss!!

    • @stealthblade2992
      @stealthblade2992 5 лет назад +1

      It is a swiss accent 👌🏽👌🏽

    • @HiWiFiDrones
      @HiWiFiDrones 5 лет назад +1

      @@stealthblade2992 Ok, yes, sorry, I know the difference! Thanks for the answer. I have relatives in Solothurn. I've been there 12 years ago. Take care.

    • @AndreasSpiess
      @AndreasSpiess  5 лет назад +1

      No problem. Many people mix Switzerland with Sweden ;-)

  • @youtou252
    @youtou252 5 лет назад +4

    paying for a debugger, yeah, no thanks

    • @ristomatti
      @ristomatti 5 лет назад

      To be fair - it might not be the thing for a seasoned C/C++ developer but PlatformIO makes a great job in simplifying it's setup. It is also not the only feature you get from the paid subscription. You can for example compile and debug devices hooked to another computer. These are features normally used only by professional developers and for a professional developer it's really not a lot. For non-commercial use it's third the price.

    • @michaels3003
      @michaels3003 5 лет назад

      @@ristomatti , it is only $36 PER YEAR for non-commercial use. That's extremely cheap if you live in a so-called "developed country" (i.e., you earn at least a couple thousand dollars a month...).

    • @ristomatti
      @ristomatti 5 лет назад +1

      @@michaels3003 Yep noticed after posting its actually 1/3 of the price you initially see. Its a bargain if you need it. Not to mention the countless of hours it could take setting up all the tools by hand.

    • @michaels3003
      @michaels3003 5 лет назад +1

      @@ristomatti , thanks, but you can (and should) edit your post. There is so much confusion on this planet...

    • @AndersJackson
      @AndersJackson 5 лет назад

      @Mai Mariarti You got all those things in Emacs, and you have Org-babel-mode and magit-mode. :-)
      And you can add your own functionality to a mode, if you want something different. Or a different key-binding etc.

  • @MikeKranidis
    @MikeKranidis 5 лет назад

    Dear Mr. Spiess, continued your tradition, this is a very informative video too. I am not sure if I will go with PIO at least not yet, but it is good to know that this nice environment exists. Thumbs up !

  • @starlingwatch3921
    @starlingwatch3921 3 года назад

    Greutzi Andreas, you have become my go-to expert on all things micro-controller. I adore your work. Vielen Dank! -Frank

  • @la6mp
    @la6mp 5 лет назад

    I have just installed platformio in VSC, and it works like a charm. I also had the pleasure of seeing #include being automaticly added at the beginning of the file. This was on W10, will later check if this is also the case on Linux and Mac. I think using VSC this way is a big step forward. Again, many thanks Andreas!

    • @AndreasSpiess
      @AndreasSpiess  5 лет назад

      I read somewhere, that, if you use the .ino ending, the line is automatically inserted. But I am not sure.

  • @brunosolothurnmann9205
    @brunosolothurnmann9205 5 лет назад

    I was working a long time with IDE and haven't changed until now to VSCode.
    Thanks to your video I was able to change more quickly as having had to read all the documents.

  • @robatoto
    @robatoto 5 лет назад +1

    Hi Andreas. As an interesting note for a Swiss guy: The brain behind Visual Studio Code is a Swiss guy too: Microsoft Technical Fellow Erich Gamma.

    • @ristomatti
      @ristomatti 5 лет назад

      I think the whole VSCode team resides there actually. Well at least the lead developer Benjamin Pasero works at a Zurich office.

    • @AndreasSpiess
      @AndreasSpiess  5 лет назад +1

      Good to know. I did not know Microsoft has developers in Zurich. I only knew of Google. So my Alma Mater brings good work to the city;-)

  • @TheRealStructurer
    @TheRealStructurer 3 года назад

    Happy I found this as I’m about to start some Arduino programming. Like your style to show issues and then how to solve them 👍🏼

    • @AndreasSpiess
      @AndreasSpiess  3 года назад +1

      Glad you liked the content of the video!

  • @jose-azevedo
    @jose-azevedo 4 года назад

    Andreas, you have no ideia of how much you helped me with your tutorial, thank you very much.
    Kind regards from Brazil.

  • @markday3145
    @markday3145 5 лет назад

    Thank you! I had not heard of PlatformIO before. I have used the Arduino plug-in for VSCode, but PlatformIO makes the experience much better.

  • @BerndSchmitt-Martinique
    @BerndSchmitt-Martinique 4 года назад

    It cant be done better. Thank you very much Mr. SPIESS.
    Das Werk eines absoluten Könners.
    Retired Dipl.-Ing., Germany

    • @AndreasSpiess
      @AndreasSpiess  4 года назад

      You are welcome! From a not-yet-retired Swiss engineer ;-) But in a few years...

    • @BerndSchmitt-Martinique
      @BerndSchmitt-Martinique 4 года назад

      @@AndreasSpiess freut mich von ihnen ein Lebenszeichen zu erhalten. Sehr nett.

    • @AndreasSpiess
      @AndreasSpiess  4 года назад

      Ich versuche, alle Kommentare zu beantworten.

  • @oscargr_
    @oscargr_ 5 лет назад

    THANK YOU so much Andreas.
    I have tried several alternative IDE's in the past. This one is the easiest to set up and works quite intuitively.
    It REALLY helps write code faster and better, more organized.
    So much easier also to split your code into separate units (.h and .cop)
    Thank you.

  • @vng
    @vng 5 лет назад

    I was using both PlatformIO and Arduino IDEs, but you have totally convinced me to make a full switch to PlatformIO.

  • @deangreenhough3479
    @deangreenhough3479 5 лет назад

    Happy Sunday Mornings🏴󠁧󠁢󠁥󠁮󠁧󠁿 loaded mine yesterday and all up and running. Your instructions are very clear and a great help with the installation. After an evening of testing, I like it. The .ini is interesting as I have a largish project with multiple libraries. Your instructions on local libraries was particularly helpful.
    I very much enjoyed how you sold it too me in under 5 mins.
    You sir are an artist. I would very much like to see you build on this initial video with debugging , Git etc.
    Thank you Andreas 🏴󠁧󠁢󠁥󠁮󠁧󠁿🏴󠁧󠁢󠁥󠁮󠁧󠁿🏴󠁧󠁢󠁥󠁮󠁧󠁿🏴󠁧󠁢󠁥󠁮󠁧󠁿🏴󠁧󠁢󠁥󠁮󠁧󠁿🏴󠁧󠁢󠁥󠁮󠁧󠁿🏴󠁧󠁢󠁥󠁮󠁧󠁿🏴󠁧󠁢󠁥󠁮󠁧󠁿🏴󠁧󠁢󠁥󠁮󠁧󠁿

    • @AndreasSpiess
      @AndreasSpiess  5 лет назад

      Thank you! Maybe I will do a video about debugging. But I have to learn it first myself ;-) Git is another topic. I think this is too special for this channel.

  • @juliannesermon8057
    @juliannesermon8057 5 лет назад

    Can't believe I still used to use the Arduino IDE... thank you for finally pushing me over the edge.

    • @AndreasSpiess
      @AndreasSpiess  5 лет назад

      Maybe the time is right now. It was more complicated last year...

  • @DanielRicardo42
    @DanielRicardo42 4 года назад +1

    Bundling all libraries as part of your project is actually considered bad practice in other areas of software development. This just bloats up your repository with code that you didn't write.
    Instead, what you should do is this:
    * Add the libraries folder to your .gitignore file so it won't get committed to you git repo
    * Manage all dependencies in the platformio.ini file, as you've shown
    * Once someone downloads your project, all they need to do is run the command "pio lib install" in the terminal (there's also a UI version of it through the VSCode command palette), and all the libs would get automatically installed
    Other than that - great video!

    • @AndreasSpiess
      @AndreasSpiess  4 года назад

      You are right. For the moment I will not use platformIO for my RUclips project as most of my viewers still use the Arduino IDE...

  • @matthewfelgate
    @matthewfelgate 3 года назад

    Thanks for making. This video helped me understand Platform.IO for the first time.

  •  5 лет назад +1

    Pretty cool for you to promote PlatformIO and VSCode together.
    One thing that I always disliked about ArduinoIDE is that it hides a LOT of C standards at a point that makes hard for one to leave it.
    Kudos to you for trying and sharing more "complex" but powerful tools.

    • @AndreasSpiess
      @AndreasSpiess  5 лет назад +2

      Most of the Arduino users do not want to be perfect. They want to have the job done and take the best tool for the purpose ;-)

  • @viniciusnoyoutube
    @viniciusnoyoutube 5 лет назад

    What a coincidence, I just look last week about another ways to program the ESP and have seen PlatformIO.
    Excellent video as always.

  • @360rover
    @360rover 5 лет назад

    finally, a contender for full Visual Studio and Visual Micro which has been doing the same thing for the past 5 years.

    • @AndreasSpiess
      @AndreasSpiess  5 лет назад

      I used visual studio a few years ago, but they lost me when the ESP8266 came :-(

    • @360rover
      @360rover 5 лет назад

      Andreas, did you use V.S. with the Visual Micro pugin? I am programming ESP32's using Visual Studio at the moment, but you need the Visual Micro plugin. The free version of Visual Micro works fine. Visual Micro seems to work on most boards ( except the Particle range), I have used it on all the Ardunio clones plus Teensy and ESP32, I do see ESP8266 in the list but have never tried it. Thanks for the video above showing how easy it is to get started, I immediately installed PlatformIO and look forward to testing it.

    • @AndreasSpiess
      @AndreasSpiess  5 лет назад

      Visual Micro always used Visual Studio. I did not try it since then

  • @bperkins
    @bperkins 5 лет назад

    I've subscribed and watched a lot! of your videos and enjoy them.. This one is excellent.. It took me a week to figure out how to get Eclipse to work with the ESP8266 and not mess things up.. What a pain... I got my project working in this within an hour and cleaned things up.. More to learn.. but this is the way to go.. Thanks

  • @jenskaa4044
    @jenskaa4044 5 лет назад +1

    Great video, and nice to see an introduction to PlatformIO, I hope a lot of others also think that this development environment is superior to the text editor called Arduino IDE.
    I hope that you will follow up with some more stuff on how to write programs for the micro controllers splitting up the program in more files ".c" and ".h".
    The next thing could also be to get rid of c++ object oriented for Arduino, the standard Atmel(microchip) CPU's does not support it correct anyway, actually you can make your programs both smaller and faster with regular C.
    By the way I have also used PlatformIO with ESP32 IDF libraries, and it work like a charm, including their Freertos. This could also be a subject to a new video.

    • @AndreasSpiess
      @AndreasSpiess  5 лет назад

      Unfortunately, I am not a programmer, only an engineer, and so I am not the right guy for the "details". But you will see debugging on this channel ;-)

  • @ateliervilvoorde4813
    @ateliervilvoorde4813 4 года назад

    I strongly regret that I have only today discovered this video. IT IS WUNDERBAR ! Especially since indeed my preferred processor platforms are Arduino (nano) and ESP32. And yes...I have an STM32 in my drawer that I’m planning to have a decent look at soon.

    • @AndreasSpiess
      @AndreasSpiess  4 года назад

      Maybe you subscribe that this does not happen anymore ;-) You find also a video about debugging ESP32s with platformIO, if you want.

    • @ateliervilvoorde4813
      @ateliervilvoorde4813 4 года назад

      I am subscribed Andreas. Maybe you see me as Jan Huygh but I log in as Atelier Vilvoorde (the company name of my maker space)

  • @edwardarchibald5697
    @edwardarchibald5697 3 года назад

    Thanks very much Andreas! This was just what I needed to get started. You present things very clearly and with a lot of good will. And I love PlatformIO. As a professional developer, I have used Eclipse for C, C++ and Java development. Now I have a strong tool, in PlatformIO, to do efficient development life-cycles with my Arduino projects. Much appreciated!

    • @AndreasSpiess
      @AndreasSpiess  3 года назад

      I also think that PlatformIO is a good combination of a good development tool with the simplicity of the Arduino IDE.

  • @rklauco
    @rklauco 5 лет назад

    I was skeptical and even delayed the watching of this video. Now I will be downloading the platformio tomorrow. Thanks!

    • @AndreasSpiess
      @AndreasSpiess  5 лет назад

      I assume you already did so and I hope you enjoyed it.

  • @matneu27
    @matneu27 5 лет назад

    I came by "accident" to Platform IO in a tutorial showing how to flash tasmota on different ESP home Automation devices. So you gave me inspiration to take a closer look on it and not only remove the Chinese spy's from my Sonoff devices :)

    • @AndreasSpiess
      @AndreasSpiess  5 лет назад

      Similar here. I had an RFID project in PIO ;-)

  • @amansaxena5898
    @amansaxena5898 5 лет назад +2

    Extremely glad to see maker community showing interest in excellent tools that we programmers use like vscode 🙂

  • @rantalbott6963
    @rantalbott6963 5 лет назад

    A potential deal-killer for me is that automatic selection of serial ports. I have an Uno connected to my PC as a peripheral, and sometimes have a couple of other Arduino projects connected simultaneously. I've had problems with the Arduino IDE automatically selecting the wrong serial port, so it's essential that I still have the option of *easily* selecting it manually (i.e., not having to hard-code it in the .ini file, and needing to remember to edit the file every time I plug or unplug a target).
    I've tried VSC for a couple of other things, and strongly agree with your comment about code completion, especially when you're learning a new language or library: the fact that it knows all the members of a class, and can suggest their name and tell you what the function parameters are, is a *big* time-saver. Good job pointing that out.

    • @AndreasSpiess
      @AndreasSpiess  5 лет назад

      As you wrote, you can hard-code your Com port in the .ini file if you want. AFAIK you can also exclude some ports from being selected.

  • @korbano
    @korbano 5 лет назад

    I’ll definitely have to give platformIO a try. Being able to see errors in real time will definitely save a lot of time

  • @Jockeponkenboy
    @Jockeponkenboy 3 года назад

    Awesome.. finally a nice program with auto complete! I have missed that in Arduino IDE from the beginning

  • @knarftrakiul3881
    @knarftrakiul3881 5 лет назад

    I've been playing around with platformio for my Tessel 2 mainly finally someone puts video up how to use it lol thank you Mr spiess

  • @NashGRS
    @NashGRS 2 года назад

    omg 7 minutes of pure gold, thank you sir!

  • @DocMicha
    @DocMicha 5 лет назад +2

    For better readability you should "forward declare" the functions and leave them behind the Loop. that is standard c++.

    • @AndreasSpiess
      @AndreasSpiess  5 лет назад

      You are right. I wanted to stay as close as possible to Arduino

  • @floridian080
    @floridian080 3 года назад

    Excellent brief presentation. A shortcoming of PlatformIO is the lack of a serial plotter. I 've read about a couple of alternative plotter applications that are compatible with PlatformIO and hope that you will make a video on this subject and explain some of the choices.

    • @AndreasSpiess
      @AndreasSpiess  3 года назад

      You still can use the serial plotter of the Arduino IDE if you need it...

  • @rak3shpai
    @rak3shpai 5 лет назад

    Thanks for the video!
    Minor corrections:
    1. I'm pretty sure you don't need to install Arduino IDE before installing the rest. In fact, you don't need Arduino IDE at all. When you specify that you're using the Arduino library in your platformio project, it downloads the necessary files (Arduino.h etc) automatically.
    2. I'm also pretty sure that it's not a great idea to commit external libraries to git. If you've specified them in your platformio.ini, the rest (downloading, etc.) will be handled by platformio. If you're worried about changing versions, which you should be, you can specify the exact version you want for each dependency in the .ini. This not only helps reduce the size of your repository, but also avoids potentially complex license issues.
    3. I think it's supposed to be pronounced 'platform-ee-o', but so many people pronounce it as platform-i-o, that I think that ship has sailed. :)

    • @andymouse
      @andymouse 5 лет назад

      I'm gonna go with you bud....platformeeoo!

    • @AndreasSpiess
      @AndreasSpiess  5 лет назад +1

      Good to know that it would work without the IDE installation, even if most of us still have such an installation and will keep it.

  • @Direkin
    @Direkin 5 лет назад

    I made the switch to MS Visual Studio Code when I bought a new laptop 8 months ago. It's a good IDE and works well under Linux, which is what I develop on. Also has good support for multiple languages I use. Discovered Platform IO at that time :)

    • @AndreasSpiess
      @AndreasSpiess  5 лет назад

      Thank you for sharing your experience!

  • @demolishedman50
    @demolishedman50 5 лет назад

    Excellent tutorial sir. I've done my share of programming for the sake of programming, this looks like a big step to creating programs that do useful things.

  • @drmocm
    @drmocm 5 лет назад +1

    Interesting alternative. And it can also be used with emacs . I will have to take a closer look.

  •  5 лет назад

    If you want to be more specific about the errors, you can check the "problems" tab bellow the editor.
    Also I strongly suggest using a linter for Cpp as VSCode can auto-fix and auto-format based upon its configurations.

    • @AndreasSpiess
      @AndreasSpiess  5 лет назад +1

      A few other viewers also suggested it. I will give it a try. Thanks.

  • @RobinGerritsen1995
    @RobinGerritsen1995 5 лет назад +1

    Would love to see more of Platform.IO tutorials! Thanks!

  • @revetastogne
    @revetastogne 5 лет назад

    I hated arduino ide, because it's not smart ide (it doesn't have autocomplete, suggestions, etc). So I've tried PlatformIO+Atom - and it was also bad. Now I watched this video - and VSC+PlatformIO is awesome! Thanks for showing this ide to your viewers!!!

  • @springwoodcottage4248
    @springwoodcottage4248 5 лет назад

    Super interesting. The number of choices now available is near over whelming for me. So many ways to do things that I often don't know what to choose & often each has subtle capabilities that only use & familiarity makes one aware of. Currently I am trying to stick to one processor (Arduino) & make the most of it, which is limiting in some ways, but also less distracting. It is remarkable that we live in such extraordinary times of abundance in so many things. Thanks for sharing!

    • @AndreasSpiess
      @AndreasSpiess  5 лет назад

      You are right about the times. I think, your strategy of going step by step is good. But extending your choice to an ESP8266 or ESP32 is also not very complicated if you need Wi-Fi.

    • @noweare1
      @noweare1 5 лет назад

      +1 Well said.

  • @PhG1961
    @PhG1961 5 лет назад

    Interesting video ! I've always been very enthousiatic about Visual Studio products. This takes it to the next level and in an environment that is familiar. Great job !

  • @jparky1972
    @jparky1972 5 лет назад

    Great video.
    The amount of times I have tried to compile a project only to have it complain during compilation.
    Project was written for an Uno and I was last working on an ATTINY85 project. ☺

  • @warperone
    @warperone 5 лет назад

    this is an excellent intro video - can't wait to see more advanced ones pls as the move from ArduinoIDE env to PlatformIO is a big one I have found but worth it I feel. Love to see how debugging can be of aid in PlatformIO for standard ESP32 and ESP8266 env

    • @AndreasSpiess
      @AndreasSpiess  5 лет назад

      I plan a video about debugging. The device is already ordered.

    • @warperone
      @warperone 5 лет назад

      Andreas Spiess very much look forward to it. Hopefully it will be applicable to both esp32 and esp8266. Your videos are excellent and continue to support you via patreon.

  • @FlyingShotsman
    @FlyingShotsman 5 лет назад

    Excellent intro to PlatformIO -- thank you! English tip: "gibberish" is pronounced with a soft "g" sound, like "jibberish."

  • @rfdave3980
    @rfdave3980 2 года назад

    I like the idea of the Arduino using all the function calls. I wish they would go though all the functions and tight them up. Rewrite tight and maybe even drop down to assembler. Then it wouldn't be so bloated. Don't get me wrong Arduino is a great idea and fantastic for beginners alike. Thank you Arduino team.

    • @AndreasSpiess
      @AndreasSpiess  2 года назад

      The compiler translates all C++ statements into Assembler.

    • @rfdave3980
      @rfdave3980 2 года назад

      @@AndreasSpiess
      Yes I knew that, I miss spoke about dropping down into assembler. I have had some weird things happen regarding timing. Thanks Andreas I enjoy your channel.

  • @97Giorgos97
    @97Giorgos97 5 лет назад +2

    I've been using #PlatformIO for a couple of months. Never going back to Arduino IDE. 😜 VSCode is such a powerful IDE.

  • @iancrowe8384
    @iancrowe8384 5 лет назад

    Thanks Andreas. I've been looking for a better IDE than the Arduino one and Platform IO/VSC looks very promising. Easy to get my head round and fast. in fact about twice as fast to compile a simple fastLED test project with PlatformIO/VSC as the Arduino IDE (1.8.9) on my old 1.8Ghz Core2 laptop.
    Love the concept of putting the Library dependencies in the platformio.ini file. No more broken projects because something has changed in one of the libraries.

  •  5 лет назад

    Thanks so much for this video. It is a huge step up from a project infrastructure standpoint.
    Please do a follow-up about testing!!!

  • @andrewg1969
    @andrewg1969 5 лет назад +1

    I'm new to arduino and I hope that one day any of what you said actually makes sense
    Edit
    As usual I gave a thumbs up as I usually love your videos and my Mrs loves your accent so I get away with watching " nerdy " videos without her moaning ,
    I don't want you thinking that I don't like your videos

    • @AndreasSpiess
      @AndreasSpiess  5 лет назад +1

      Greetings also to your Mrs. I am glad she likes my accent!

    • @michaels3003
      @michaels3003 5 лет назад +1

      Andrew, when you try to learn something, don't limit yourself to watch a video of this type only once or twice.

  • @user-vn7ce5ig1z
    @user-vn7ce5ig1z 5 лет назад +1

    8:13 - Make sure to click the correct plug icon (the one that has PlatformIO in the tooltip). I had another plug icon (with 'serial monitor' next to it) but that didn't work and opened a terminal which gave the error "'platformio' is not recognized as an internal or external command, operable program or batch file." Using the correct button worked.
    I couldn't get the ESP mode to work with any of my ESP-based devices; it gives the error "A fatal error occurred: Timed out waiting for packet header" on upload. If you have this problem, you'll need to change the target board (make sure to set this correctly in the project-wizard because changing it later is a real pain; the button in the toolbar at bottom-right won't work unless you have the Arduino IDE installed and set VSCode to point to it, which defeats the point of using VSCode instead of the Arduino IDE).
    Be aware that PlatformIO will install the entire toolchain in its own separate folder in the the user's folder, so if you are already using the Arduino IDE, you'll end up with a couple of gigabytes in the _%localappdata%\Arduino_ and a couple more in _%userprofile%\.platformio_ .
    I haven't tried it yet, but apparently PlatformIO also supports STM devices.

    • @AndreasSpiess
      @AndreasSpiess  5 лет назад

      Thank you for the tip. Board selection is also important in the Arduino IDE because it decides which programming procedure the board uses. No difference here.

  • @shsftech3792
    @shsftech3792 4 года назад

    This is sweet! Im using VSC editor because its free and fast compare to other IDE out there. The fact that the Platform IO is supported in VSC, this will make programming enjoyable and easy to debug. thank you for this very helpful video!

  • @Leif_YT
    @Leif_YT 4 года назад

    I've often tried it and then switched back to Arduino IDE ( + sometimes an external editor) again. One thing i don't like about platform.io are the missing settings / fuses for the microcontrollers (BOD, ClockSpeed, Voltage Reference and all that nice settings). It's possible to change them with the preferences on platformIO i guess, but it's so much more convenient to see all available options in a menu and be able to change them with a click rather than having to look up everything in the documentation.
    Also i stumbled a few times on compatibility issues. The new great Atmel processors for example like the ATtiny412, ATtiny1612 and so on. Spence Konde did a nice job with supporting them on the Arduino IDE (megaTinyCore), but there doesn't seem to be a solution for PlatformIO.
    And working in two different IDEs and switching forth and back between them isn't so convenient, especially because they handle a few things different. So i stayed with Arduinoe IDE and use sometimes an external editor and look forward to the progress of the Arduino Pro IDE.

    • @AndreasSpiess
      @AndreasSpiess  4 года назад

      It is up to each individual to chose what is best. I use the Arduino IDE for RUclips because most of my viewers use it.

  • @JerryEricsson
    @JerryEricsson Год назад

    Having a hell of a time with my wifi radio projects, they moved to Project IO which, perhaps cause I was screwing with it? no longer compiles the code. Yesterday I was building a radio for mom, who is 96 in the local nursing home, to listen to her old favorite radio programs from the 40's and 50's which are readily available on wifi broadcast. Mom could not have any idea how to run a PC or tablet and her failing eyesight would not allow it even if she could see. So this radio was planned to have push buttons for 5 radio stations, our local AM/FM and 4 of her old time favorites. I had a programed ESP32 for it and everything was working fine till I decided she should have a 16X2 display to light up what channel it was on. While changing the Preference files, the write failed and knocked out the esp32's programing. I have been working all morning trying to get it to reprogram but since I have upgraded to 2022 version of MS nothing seems to work even going back to the old version has not fixed things. Ah well more work, more play perhaps I will get it set up before my next trip to see her after my visit with my MD in a couple days.

    • @AndreasSpiess
      @AndreasSpiess  Год назад

      Good luck. I know. PlatformIO is not easy to start with.

  • @ForOurGood
    @ForOurGood 2 года назад

    Being a Visual Studio developer going back as far as Visual Basic 1.0, i can tell you I am always sick and frustrated using the Arduino IDE. Don't get me wrong, I appreciate for what is and how it made so many things possible, but simply put, this is a terribly unproductive IDE (I also started doing machine code compiling on paper, so I know chasm between unproductive and productive development environments!). Anyway, THANK GOD for these people who put PlatformIO together, and thanks to you for letting us out of the loop guys know about it, I am off to install it right now!!!!!!!!!!!!!!!!!!! All the development world needs to do next is rid themselves of the "C" curse and make Python (or other similar modernized "readable" language) a fully supported compiled language, if only to rid us of the stupid bracket "{ }" curse.

    • @AndreasSpiess
      @AndreasSpiess  2 года назад

      I agree that the Arduino IDE is not great. But most projects are not too big and the advantage of having a library or a project to start with is a productivity booster.
      For bigger projects I am also happy that PIO exists.

    • @ForOurGood
      @ForOurGood 2 года назад

      @@AndreasSpiess This true, and has proven to be the case for me too, and probably will still be a necessary tool for some time. But let's hope that something like PlatfromIO can get good traction, and over time give the Arduino IDE a little shove towards it's hard earned retirement.

  • @BaronVonBiffo
    @BaronVonBiffo 4 года назад

    This is one of those videos that I wish I could "Like" every time I watch it.

  • @miked3655
    @miked3655 5 лет назад

    Love your videos and credit/blame you for my obsession with LoRa!! This video is just in time for my recent discovery of PlatformIO and trying to use some of the Github repositories on my LoRa projects with this IDE. Although I have discovered it is not necessarily as easy as copy/paste. Further demos of using/modifying Github repositories would be appreciated, by me at least.
    Thanks again for your great videos and sharing your knowledge.

    • @AndreasSpiess
      @AndreasSpiess  5 лет назад

      I am not sure if I will cover Github in detail. Too special knowledge for this channel, I think.

  • @Taras195
    @Taras195 5 лет назад

    No I am going to test this out. Seems to be a very good way to organize project, and seems to be a significant improvent to use fullscale development system instead of sketch type ide

  • @064sasa
    @064sasa 5 лет назад

    I would ask you to make a video on how to install Platformio on RPi3-B + to program Arduino and ESP32 step by step. There are many misguided instructions on the internet that create confusion. Your analysis and instructions are always reliable. Thank you for your help.

    • @AndreasSpiess
      @AndreasSpiess  5 лет назад

      I think I quickly showed in this video. It is quite easy if you do not use Atom.

  • @macdroid53
    @macdroid53 5 лет назад +1

    Not sure if others have mentioned...but, on Linux the pretty print is Ctrl + Shift + i