#264 PlatformIO for Arduino, ESP8266, and ESP32 Tutorial

preview_player
Показать описание
Would you like to have a better tool to program your Arduino or ESP boards? More productive, more flexible, but still compatible with all our Arduino sketches and libraries. Also easy to use? Let’s have a look if PlatformIO is that tool.

Links:

My Bitcoin address: 19FSmqbBzb5zsYB1d8Bq4KbxVmezToDNTV
If you want to support the channel, please use the links below to start your shopping. No additional charges for you, but I get a commission (of your purchases the next 24 hours) to buy new stuff for the channel

Please do not try to Email me or invite me on LinkedIn. These communication channels are reserved for my primary job
Рекомендации по теме
Комментарии
Автор

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.

dirk-janfaber
Автор

Sidenote: for VSCode with PlatformIO you don't need to have arduino IDE installed.

Finally a big YouTuber suggests PlatformIO with VSCode to the beginners, now they can start with a real and powerful IDE.
Thanks!

crckdns
Автор

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

BaronVonBiffo
Автор

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.

freepoet
Автор

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.

kluzz
Автор

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!

marcosmercado
Автор

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!

garrypkeogh
Автор

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

jose-azevedo
Автор

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.

gir
Автор

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?

sensesciencescenes
Автор

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.

CraftyOldGit
Автор

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 It's a joy to use along with tons of community supported add ons.... Brilliant....

tonybell
Автор

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.

VincentFischer
Автор

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

YouGenom
Автор

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 !

PhG
Автор

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 👍🏼

TheRealStructurer
Автор

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

SebastienChedalBornu
Автор

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

Corgitronics
Автор

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

somedude
Автор

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

juliannesermon