Тёмный

Getting Started with PlatformIO 

DroneBot Workshop
Подписаться 600 тыс.
Просмотров 612 тыс.
50% 1

Get started with PlatformIO, a great alternative to the Arduino IDE. Examples with Arduino, ESP32 & XIAO microcontrollers.
Article with references & code: dronebotworkshop.com/platformio/
More articles and tutorials: dronebotworkshop.com
Join the conversation on the forum: forum.dronebotworkshop.com
Subscribe to the newsletter and stay in touch: dronebotworkshop.com/subscribe/
Today we are going to be programming microcontrollers with PlatformIO, a development environment with many advantages over the Arduino IDE.
I’ll show you how to install PlatformIO under Visual Studio Code (VS Code), a free programming environment from Microsoft (yes, Microsoft also makes free software!). Full instructions for Linux, Mac OS X, and MS Windows.
After we add the PlatformIO plugin to VS Code I’ll show you examples of using it with an Arduino Uno, an ESP32 development module, and a Seeeduino XIAO. You’ll quickly see the advantages of using this amazing programming environment.
I’ll also show you how to use the PlatformIO Library Manager, and how it differs from using libraries with the Arduino IDE. To do this we’ll also build a dual servo motor controller with an LCD display.
Here is the Table of Contents for today's video:
00:00 - Introduction
02:22 - PlatformIO Basics
06:51 - Install VS Code - Linux
08:28 - Install VS Code - Mac OS X
10:13 - Install VS Code - MS Windows 10
11:55 - Install PlatformIO plugin for VS Code
13:56 - PlatformIO Basics with Arduino Uno
18:29 - PlatformIO Basics with ESP32
21:09 - PlatformIO Basics with Seeeduino XIAO
25:18 - Functions with PlatformIO vs Arduino IDE
31:17 - PlatformIO Library Management Basics
33:43 - Dual Servo Controller Demo Hookup
36:01 - Dual Servo Controller Code & Demo
46:44 - Understanding the platformio.ini file
Hopefully, after viewing this video you’ll be tempted to give PlatformIO a try. It can really speed and improve your coding tasks once you get used to it, and you’ll be seeing more of it here in the DroneBot Workshop.

Хобби

Опубликовано:

 

24 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 569   
@Dronebotworkshop
@Dronebotworkshop 3 года назад
Thanks for the great response to the video, and I must apologize for the bad link that I put in the description for the article! It has now been corrected, sorry about that! I also have a post where you can discuss this video in detail on the DroneBot Workshop Forums, you'll find that link in the description as well. And I promise this one works! BTW, I'm planning on another PlatformIO video soon, to answer some of the things I left out here. So please subscribe if you haven't already so that you get notified when it is released.
@edwardaudet8367
@edwardaudet8367 3 года назад
Thank you , the video was excellent. I learned something new. And i can't wait to get this going for my arduino projects.
@certified-forklifter
@certified-forklifter 3 года назад
This video was very clear and helpful! Thank you so much! :D
@passenger000
@passenger000 3 года назад
it would be nice to see some processing/java serial plotters in new video
@Meennnoo
@Meennnoo 3 года назад
Thank you for this clear tutorial! This must have taken some time to put together. Two things I would like to know of PlatformIO: 1) How to organise lengthy code files, in the Arduino IDE I used tabs for that but I don't see that option here. 2) Perhaps you could elaborate on how to set up OTA programming in this environment. Thanks again for this video! Oh, and is there an equivalent of auto format (ctrl+T) in PlatformIO?
@passenger000
@passenger000 3 года назад
by the way I have one serial plotter app for windows, which utilizes just default print command in code and supports few graphs on one plot
@DesertVox
@DesertVox 3 года назад
It's CRAYZEE that such detailed and organized tutorials are available for free. Thank God for the internets.
@Friendroid
@Friendroid 3 года назад
@@mitch_the_-itch have you been checked for lead poisoning lately?
@khalidmaulana9838
@khalidmaulana9838 3 года назад
@@mitch_the_-itch danke
@shaunmorrissey7313
@shaunmorrissey7313 3 года назад
Mitchel R******** and is there a down side?
@Friendroid
@Friendroid 3 года назад
@@mitch_the_-itch I didnt say it was free, I dont live in a binary world.
@thearchibaldtuttle
@thearchibaldtuttle 3 года назад
@@mitch_the_-itch don‘t forget your tinfoil hat 👒
@larrytubbs
@larrytubbs 3 года назад
I've been a software engineer for 20+ years. Platform IO is so much more comfortable for me than the Arduino IDE. VS Code is my second home. Thanks for the great introduction.
@reedreamer9518
@reedreamer9518 3 года назад
Running PlatformIO in VS Code is NOT suitable for large applications. It cannot handle multiple files and it restricts you to ordering your functions before they are called, which is only a sign of a primitive compiler - and does NOT make your code any "better". PlatformIO has some useful features compared to the Arduino IDE, but overall the Arduino IDE would be more suitable for developing larger (multi-file) applications. Because of the restrictions, PlatformIO is really only suitable for simple sketches. If you want the best of all worlds with no restrictions, use Visual Studio Community or Atmel Studio with the Visual Micro plug-in. I've tested all the above and this is definitely the way to go. Visual Micro totally blows PlatformIO away!
@GonePh1shing
@GonePh1shing 3 года назад
@@reedreamer9518 This simply isn't true. PlatformIO works just fine with multi-file projects, it just doesn't do all the automation that the Arduino IDE does. You have to treat the project like you would any other C++ project with forward declarations, header files, header guards, etc. Visual Micro is really good from what I have seen, but there's no need to fork out $100 for it when PlatformIO is FOSS and does what most people need it to.
@maxpower6542
@maxpower6542 2 года назад
@@reedreamer9518 Nonfactual. Use forward declarations.
@gautombose4172
@gautombose4172 Год назад
@@reedreamer9518 Visual Micro is not Free.
@arnolduk123
@arnolduk123 Год назад
@@reedreamer9518 PlatformIO uses C++ coding principles. If you know anything about programming then you should know that C++ also use Header files for defining and declaring functions within your code. C++ is more than capable of handling multiple files. The video simply shows a quick way of using functions without a header file. The correct way should be to declare and define the function along with it's parameters within a header file then include that header file at the top of your C++ code file. PlatformIO is a very powerful tool as the end user does not have endure the stress of downloading all the SDK's, tools and packages to compile a simple blink code for over 900 devices. Try that in the Arduino IDE then withdraw your comment 🤨 The Arduino IDE still has some good features but for large scale projects with multiple files I'd much prefer a more capable IDE such as VSCode with PlatformIO. Sounds to me that you are struggling with the structure of the C++ programming language which requires some ground level learning first 🤔
@karllaun2427
@karllaun2427 3 года назад
Thanks so much for making this video. I installed VBC and PlatformIO about a year ago, but really struggled to understand the usage and functions. Lately, I've been picking out bits and pieces from other RU-vid videos, but this one really ties everything together and makes sense out of some items I was having issues with. I look forward to more content on this subject. Well done!
@92mrkite
@92mrkite 2 года назад
Clear, concise, extremely well documented: a paradigm of a perfect tutorial. I’m an Arduino newbie, now fully convinced to leave Arduino IDE for PlatformIO. Motivation reloaded!
@51zodiac
@51zodiac 3 года назад
Just started out with PlatformIO today, sat down and did the whole tutorial, downloaded the exercises, everything was really clear. Thank you so much for an excellent video!
@tenocipri2566
@tenocipri2566 Год назад
Thanks for the informative workshops. I am a longtime hardware engineer who did a lot of C and C++ work in the late 90s up to about 5 years ago and, as you can imagine I'm am quite rusty. As a nubi to Arduino there are a number of issues I ran into but your videos usually got me through them. Whenever someone had a video that used PlatformIO the screen was so cluttered it became overwhelming. Throughout my history of writing code, setting up the IDE was what made or broke my sucess at it. As you mentioned in the video, the Arduino IDE is very simple to use, and a great way to get familiar with hardware and software development. After a few weeks I've been able to get a lot done in it and ready to move on to PlatformIO. Your video is very clear and easy to follow along with. Great job.
@romanalaivi6967
@romanalaivi6967 Год назад
I would like thank you for a series of impossibly thorough videos on working with with the various embedded systems available to hobbyists like me. You've communicated every single concept so clearly and so well in every video I almost feel like this is too good to be true. Your channel is a treasure, literally. How so many informative videos can be packaged up like this for free is amazing. This is a better education than I've ever come across in my old comp sci classes at college. A sincere thank you. You're teaching a generation of kids out there how to do some really cool things.
@jeffro.
@jeffro. Год назад
He's not just teaching kids! I'm 67, and I learn a lot of stuff from this channel! And I've been doing embedded development and other electronics for decades. People think I'm smart, this guy is really talented!
@YoutubeBorkedMyOldHandle_why
@YoutubeBorkedMyOldHandle_why 3 года назад
Thank you Bill. There's nothing here that I haven't come across before, but you've put it all in one video and covered everything it in brilliant detail. So, I'm going to fine tune my setup, while re-watching your video ... in case I might have missed something.
@ShadowCruize
@ShadowCruize 3 года назад
this is insane timing , i have been very recently researching moving to specifically platformio on vs code and i had some issues with it, and this video comes out a few days later and clears everything up.
@raagamparmar179
@raagamparmar179 3 года назад
Yup me too.....😁
@briandavis7033
@briandavis7033 3 года назад
Same
@droidebuilder486
@droidebuilder486 3 года назад
same
@michelpoisson3500
@michelpoisson3500 3 года назад
You are like wine, You are always getting better and better...And I have to mention that you started from VeryGood!! Congratulations!!
@guyprovost
@guyprovost 2 года назад
I'm a VS veteran, been using the platform in it's different iteration over the years and tend to forget how awesome it actually is compared to more basic IDE. You did an awesome job of showing the capabilities of VS Code and overall, your videos are so well done with the correct amount of information. You sir are a very good teacher! Thanks for the content!
@gautombose4172
@gautombose4172 Год назад
It is time to show a Pico Debug with PlatformIo IDE
@passenger000
@passenger000 3 года назад
I switched to Visual Studio Code and actively use PlatformIO for past month to finish my project at work. Very helpful video Bill! thank you
@michaelmcnaughton1535
@michaelmcnaughton1535 3 года назад
Your videos are absolutely top notch. I watch about 10 or so different you tube presenters who really put it all out there (Andreas Spiess is another standout) and your work is so excellent. Thanks for being there.
@TYGAMatt
@TYGAMatt 3 года назад
Why someone wouldn't subscribe to your channel is beyond comprehension. Probably the clearest explanations on you tube. I toyed with platform io a while back but ended up sticking with the Arduino IDE. But thanks to you I'll take a fresh look. Thanks Bill.
@rjinnh3933
@rjinnh3933 3 года назад
WHOW! Simply Whow..... 51+ minutes of pure instruction that's probably going to save 51 hours of frustrated head banging on the work bench. A great intro to PlatformIO from instillation to practical use. Very inspirational. Hat Tip to you Sir.....
@burnermaster5375
@burnermaster5375 3 года назад
Thank you so much for this excellent tutorial. You solved the problem I had with including additional libraries on my project. Nobody goes over this crucial task, they only demonstrate the LED blink project with the built in libraries.
@dwhughes1975
@dwhughes1975 Год назад
I love this. I love you. I'm a competent-ish computer geek in other spheres, but I'm a beginner at both embedded programming and VS, and I've been making progress but a lot of the material has left me stuck in the middle thinking, "WTF, what did I miss?". It feels like striking gold when you find a teacher who knows all their stuff but can still put themselves in a newbie's shoes to make sure all the basics are covered in detail. And the result is that where I was starting to despair of the Arduino IDE and fall backwards to arduino-cli, now I've jumped forwards again to a much more capable and supportive environment. Which feels amazing. :) Thank you sensei for the sense of empowerment and potential!
@VinceBusch
@VinceBusch 3 года назад
You're the man! Just migrated to PlatformIO, ran into issues with the terminal, watched your video, solved. Many thanks, again!!
@queenidog1
@queenidog1 3 года назад
This was one of the best How-To videos I've ever seen. Very clear and concise. I had tried to install PlatformIO a number of times but kept getting bogged down with dependencies. It was like Linux all over again... but this video really made it clear how to get it going from an Arduino perspective. I got it going, put in an Arduino program and got couple errors. One library (from GitHub) was NOT found and I had to add it manually...some hassle. I was able to build but now can't upload, says nothing at COM1 where my boot loader gizmo is located. (I use it to program an Atmega 328P MCU, using the program port.) Works perfectly well in Arduino, but not in PIO. Again. I haven't got time to keep doing these little fixes. I had a Corolla IDE, wanted a Mustang, got a Ferrari. Well Mr. Ferrari I will be delisting you.
@timobreumelhof88
@timobreumelhof88 3 года назад
I'm getting back into electronics after about 20 years and I love your videos!
@willlockler9433
@willlockler9433 3 года назад
Same situation!
@FranekFunFacts
@FranekFunFacts 4 месяца назад
Same too !
@jimstarwood
@jimstarwood 3 года назад
This is now the 30th+ of your YT videos I've been binge -watching. You do a great job of teaching. Subscribed.
@harrykunte1021
@harrykunte1021 3 года назад
Although I have been using PlatformIO for some time, I still found this video very educational. I am already looking forward to the sequels. Thank you and many greetings from the Black Forest in Germany.
@guy-francknakach488
@guy-francknakach488 3 года назад
Brilliant tutorial, clear and uncomplicated with just the right level of details. Clearly well prepared and delivered. Many thanks!
@browland601
@browland601 2 года назад
Thank you, just got my first esp32 project going from scratch on platform io with no issues by following this tutorial!
@mikesearle7077
@mikesearle7077 2 года назад
Yet another brilliant video! You explain things clearly and simply with an exceptional attention to detail. Thank you for introducing this topic, as a retired programmer I’m much more comfortable using VS so this will really reinvigorate my interest in this type of project. Thank you.
@VelocityTheory
@VelocityTheory 2 года назад
I e never seen PlatformIo or anything about Arduino before and DBW made me feel like I understand it. This is a sign of a great teacher. Thank you DBW.
@klave8511
@klave8511 3 года назад
Wow, what a great tutorial, I followed from a fresh install with the only minor issues being the drivers for my boards. I even got my Digispark ATtiny85 board running without a hitch. Thank you very much, great details.
@markmccornack7983
@markmccornack7983 3 года назад
Another great video! This one was particularly useful to me as I was just trying to bring up VScode as a new IDE to try (replacing the Arduino IDE). I couldn't get my previous Arduino IDE code to port over readily as I couldn't get the library path issue figured out. I looked at several different cryptic online sources with no luck. Your video made it clear as a bell. Setting baud rate in the terminal too was mired in dead ends. That was made clear and simple here as well. To the point, simple answers to simple questions. What a concept! Thanks for doing these vids!
@wb7ond
@wb7ond 3 года назад
I dove into the VScode and downloaded PIO. Blindly started an Arduino project, got it to work, then tried to get a new project. I got lost in the "woods" of C++ and VScode. Your vid helped me understand that my Arduino projects were managed thru the PIO and not in the VScode itself.. Thanks a million for this video. I tried to figure out how to make a new project, but was searching for the wrong thing... Your video made me realize I had exited the PIO environment and was wandering around in the VScode C++, where there are no "new project" selections... Thanks again...
@ChrisBalmforth
@ChrisBalmforth 3 года назад
I just discovered this video, and through it your RU-vid channel and web site. Fantastic! I'm just getting to grips with PlatformIO and VSC, and this video cleared up some problems I was having. Keep up the great work!
@zapphoddbubbahbrox5681
@zapphoddbubbahbrox5681 3 года назад
Thanks for the videos! You seem to be the only person out there doing these in-depth tutorials on these topics. Regarding Function ordering vs. IDE - this is actually C++ being a more strict language : the compiler won't reorder for you. Reordering is an option, however more complex code may force you to declare your function ( before being fully defined) at the top of your oode as a stub. This has the added benefit providing more robust documentation for other people who might maintain your cod , if you find yourself in that type of environment.
@jeffro.
@jeffro. Год назад
Or even if I'm the one to go back and edit the code sometime in the future, after working on other projects! Yep, good documentation of code is essential!
@SpeccyMan
@SpeccyMan Год назад
Function prototypes have been a feature of C/C++ from the outset. The Arduino IDE's obfuscation isn't a good thing at all and teaches bad programming habits.
@technohelp21
@technohelp21 3 года назад
This is such a great video! I've used VSCode for React Native and TypeScript in the past and loved it. I'm pretty new to Arduino, the fact that I can use the PlatformIO plugin for VSCode is such great news. I love your videos, please keep up the excellent work.
@peter.stimpel
@peter.stimpel 3 года назад
Man, if I had known this 2 weeks ago you are doing this video. I was struggling with some parts of my VSC/PLatformIO installation, and it took me some good time to duckduckgo the details. Well done. What I like most is that in VSC/PlatformIO the board settings are part of the project. Great, if you work with different boards in the same IDE
@melvinbullock5674
@melvinbullock5674 3 года назад
Thanks Bill! As usual, concise and informative. I see the reasoning behind the changes, bring on more DB1! Best regards from the UK.
@NLGeebee
@NLGeebee 3 года назад
“Welcome to the Workshop” My favorite sentence, right after “I love you” and “Happy birthday” :)
@nateamus3920
@nateamus3920 3 года назад
Lolol!
@casemodder89
@casemodder89 3 года назад
Yep goes down just as creamy like "hello everyone and welcome" by jason fenske (EE) 😎
@neilbarnett3046
@neilbarnett3046 3 года назад
You must have lived a sheltered life so far. ;-)
@nicksterspad
@nicksterspad 11 месяцев назад
I accidentally clicked this video scrolling and had to finish something on another tab before I clicked off it but before I knew it, the whole video was over, I picked up some things I've been wondering about, and it helped me fix the sketchbook I have open on on the second monitor. Great work!
@larrysmall3521
@larrysmall3521 3 года назад
Thank You! I am a retired embedded systems engineer. I use the Arduino for simple home projects and I have always thought the Arduino IDE was too basic. Platform IO is exactly what I was looking for. I did not want to try and setup Eclipse for Arduino and this is perfect for my needs. One suggestion, instead of moving the function ahead of setup() in the blink example it would have been the perfect time to explain function prototypes and how they are required for C and C++.
@elonyao3894
@elonyao3894 Год назад
I met the xxx was not declared in the very first day using PIO for Arduino, that frustrated me for a half day until I wrote a header file.🤣
@33_njindo72
@33_njindo72 6 месяцев назад
Hey @larrysmall3521 as an embedded engineer could you explain your line of work...... I'm a student looking to major in embedded systems and electronics
@viktorkoryavyy
@viktorkoryavyy Год назад
I'm very impressed!!! This is the best intro I've seen for using Platformio (product developed in Ukraine)!!! Now I try to create small inexpensive setup for fridge and electricity availability monitoring (for my close relatives) in Ukraine based on ESP32. It's really help me!
@juankmilisimo
@juankmilisimo 3 года назад
Cada video esta tan bien producido, tan detallado, tan impecable, que uno se queda con la boca abierta. Gracias Bill
@peppyzacat5179
@peppyzacat5179 Год назад
You, Sir, are a treasure to the mankind! Thank you for taking the time to educate others in such a clear and simple manner!
@jacobgellinger
@jacobgellinger 11 месяцев назад
Thank you for breaking this down so simple. Been tearing my hair out trying to figure this stuff out and you have a great ability to relay this info into a way i can understand.
@aloysiussnailchaser272
@aloysiussnailchaser272 3 года назад
Very useful, thanks. I’ve just started using PlatformIO. Perfect timing.
@Helli__
@Helli__ 3 года назад
I really like your very detailed tutorials. You're not too fast and it's still easy to follow, even for me, who doesn't speak English as a first language.
@ionix2000
@ionix2000 3 года назад
This tutorial is amazing. Thank you very much for all your effort on making this video. For me it was critical to know that vs code integrates so good with platformIO.
@klaymon03
@klaymon03 3 года назад
Bill, another outstanding video. It sounds like you've changed something in your audio setup for the off-screen parts of the presentation (showing circuit diagrams, etc.). It sounds much better. It wasn't awful before but now the sound is more uniform across the entire presentation. Well done.
@justyx846
@justyx846 2 года назад
Thank you very much. This video gave me the confidence to select this IDE for my new hobby. Writing code wasn't my issue, picking the right IDE for a new (to me) device from the start was.
@OcenaSoft
@OcenaSoft 3 года назад
Oh My! Just when I thought things could not get any better - you come up with another amazing tutorial. Amazing, with a night off tomorrow - I will be installing on my Linux Mint work station and let you know how it goes. Please keep up this amazing work...
@JonathanDeWitt1988
@JonathanDeWitt1988 3 года назад
After your other video introducing the XIAO it is exciting to see more videos on it. Thank you for putting this up Bill.
@madlogik
@madlogik 3 года назад
Thanks Bill! You (once again) clarified a lot of things for me. I had dug in platform.io already ... but the way you set the stage makes it clear and more concise (vs studio code can be hard to grasp!!)
@danieloliveira9815
@danieloliveira9815 3 года назад
Once you get it, vscode becomes your loyal best friend
@Streetdirt
@Streetdirt 3 года назад
Thank you for this great tutorial. PlatformIO is just what I was looking for and I got it work easily thanks to your instructions. You are an excellent teacher.
@hughmulgrew6966
@hughmulgrew6966 3 года назад
Yet another excellent presentation. Compelling, inciteful, informative and entertaining - what more can I ask for.
@vincent.borreux
@vincent.borreux 3 года назад
Thanks a lot for this introduction to PlatformIO. Thanks also for this "complex" sample! Really like this video and look forward to watching next ones...
@hennero.3826
@hennero.3826 7 месяцев назад
Thanks very much for this video. I have been working in IT for many years, but I have just started with Microcontroller programming only 1..2 weeks ago, so I really appreciate that you explained VSCode and PlatformIO so well, even showing the installation on 3 operating systems. This has motivated me today to install both on my Linux laptop - and it works! 😃 On Linux, I now need to pay attention to the access right for the port (which I didn't need to worry about under Windows), and apparently the "chown " needs to be done after each restart (or reconnect), but I am using OTA anyway now most of the time ...
@WillBelden
@WillBelden Год назад
Not even hardly into the video yet and I simply love how organized the shop is!
@flyingfarm1
@flyingfarm1 3 года назад
Wow, great, love this level of detail. For someone with no experience with any IDE, other than Arduino, this is excellent. Just subscribed.
@duncancampbell9742
@duncancampbell9742 3 года назад
Thanks for this ... loving PlatformIO after installing it based on this video. I've been using Arduino IDE since getting my 1st Arduino (Elegoo Mega2560) about a month ago, and today received an Elegoo Nano. Took a while to get the COM Port working, but all good now. PlatformIO is delivering the IDE environment I'm used to from years ago when c/c++ programming.
@JoseFernandez-yz1sf
@JoseFernandez-yz1sf 3 года назад
As usual here in DroneBot Workshop, this has been an excellent tutorial on PlatformIO, thanks a lot. I'm thinking to switch to this VS Code/platformIO IDE for my embedded projects.
@ianbertenshaw4350
@ianbertenshaw4350 3 года назад
I have to learn to use platform io to sort the firmware for 32bit boards used in 3D printers and this has helped me immensely- thanks Bill !
@curtisibarra1600
@curtisibarra1600 2 года назад
Bill, I want to thank you for such a well crafted instructional video. You really bring it home in an understandable and clear way… Respectfully: Curtis
@Burborted
@Burborted 11 месяцев назад
Haven't seen anything better so far. I'm deeply impressed and I can't suggest anything to make it better. Thanks you sir.
@mountainsprings3303
@mountainsprings3303 3 года назад
Thanks for that great tutorial. I looked at platformIO before and was unable to work it out, I have a much better understanding of it now.
@dcpowered
@dcpowered 3 года назад
This is extremely useful given the many limitations of the Arduino IDE. Thank you!!
@headbanger1428
@headbanger1428 2 года назад
Great job Bill! Very comprehensive! I actually feel confident using it now.
@markharrisllb
@markharrisllb 3 года назад
I installed python3 for the first time through Visual Studio and I still had to do the same command line in the Terminal as you did using Snap. Please bear in mind I haven’t a clue what I’m doing, hence my massive gratitude to yourself and Paul McWhorter.
@jackdaniels8898
@jackdaniels8898 3 года назад
Excellent primer for Platform IO. Thank you very much.
@rene-jeanmercier6517
@rene-jeanmercier6517 3 года назад
Hi, Thank you for This Excelllent excellent tutorial. I thing though I want to mention, is that it is NOT an obligation to put the functions in front of the loop(). You simply need to "declare" the "prototype" of your function so that the compiler is made aware of the function and can double check the integrity / match of the parameter's types declared. Thank you again for an excellent tutorial. RJM
@slinco65
@slinco65 3 года назад
For those that maybe don't know what @René-Jean just said: Simply add the function declaraion line `void blink_led(int LED, int delaytime)` above the loop() - no need to move the whole function.
@omshree901
@omshree901 3 года назад
@@slinco65 thank you
@JosueMartinez-ww1vj
@JosueMartinez-ww1vj 3 года назад
Thanks so much! for this type of tutorials, they are very helpful and bring me back to when I was working on capstone course of computer science.
@MrJoegotbored
@MrJoegotbored 3 года назад
I've always been impressed with the Microsoft IDE built into their Office suite for VBA. I'm excited to try the VS Code IDE now.
@BryanByTheSea
@BryanByTheSea 3 года назад
Excellent video, struggled with VS Code IDE trying to figure it out, your video put it all together. Thumbs up.
@insanebullet
@insanebullet 2 года назад
Your teaching style and video production is top notch!! I've been learning so much watching countless tutorials of yours.
@Dronebotworkshop
@Dronebotworkshop 2 года назад
Thank you Robert, so glad you have benefitted from my work.
@danialothman
@danialothman Год назад
thank you so much, I cannot believe it took me this long to use PlatformIO!
@flashcorp76
@flashcorp76 3 года назад
OK, going round this the second time, getting there ! I like the way things have to be declared sequentially ! It suites my mind !
@summerWTFE
@summerWTFE 3 года назад
Thank you! This was very informative! Something I’d like to see would be how to create personal helper classes that can be used across projects. Like having a math, string, array, and other classes that contain methods you use the most.
@ontropia
@ontropia 3 года назад
Fantastic instruction video! Clear, well organized, with attention to details, Just perfect!
@GeekRedux
@GeekRedux Год назад
It's common practice to not make the code too "front heavy" by putting all the function definitions after setup and loop like you had it before, but _duplicate just the first line_ of the function definition (e.g., write just "int sample_function(int var1) ; " ) before setup and loop. This line is called a function prototype and it's there to make the compiler aware the function exists so it doesn't throw the error you see but still makes for arguably more readable code. Not making these prototype declarations necessary is some of the hand-wavy stuff the Arduino IDE does to make coding more accessible for beginners, but that can also lead to moments of confusion/difficulty when people move beyond it. I continue to be impressed by the clarity and high production quality of your tutorial videos--thanks for helping the community like this!
@mikevanin1
@mikevanin1 3 года назад
Wow Bill - this is a fantastic video! Well done - and many thanks!
@HappyHermitt
@HappyHermitt Год назад
You're channel is one if the best in the subject. Thank you for your dedication and work.
@pgfitzgerald
@pgfitzgerald 3 года назад
Thanks for this video! I wasn't aware this was even and thing. I'm loving PlatformIO!
@brendanowen7563
@brendanowen7563 3 года назад
Another great video. Thank you for showing how you use platformIO. I have started using successfully, already I prefer this over the Arduino IDE.
@mrCetus
@mrCetus 2 года назад
Great video! Pro C++ tip: For cleaner code, you can split function declarations and definitions. This allows you to have the first proper block of code be your main function/loop, whilst still allowing you to write and call functions separate from your main function. To do this, just declare the function before your main like this: void myFunction(); Then, write your main function, and define your extra function below the same as you did in the Arduino IDE.
@InscrutableObjects
@InscrutableObjects Год назад
Thank you for this! Great info coupled with the video.
@naidol
@naidol 3 года назад
Excellent tutorial. It simplifies the transition from Arduino IDE to platformIO. Really informative. Thanks
@englishrupe01
@englishrupe01 3 года назад
Fantastic intro to PlatformIo! Thank you!
@frank.moerman
@frank.moerman 3 года назад
Thanks a lot for ALL your tutorials! Very helpful.
@AdhavR7
@AdhavR7 Год назад
Very Clear and full of substance in all his videos. Very Nice.
@w.1929
@w.1929 3 года назад
I have been trying Platform IO about a year ago but just could not get to the bottom of it. This video really helps, I will update the software and give it a go again! Thanks!
@totem1997
@totem1997 Год назад
Thanks for making this video. You make many people life easier. Just migrate all my dev tool to Visual Code Studio and have everything centralize on one editor. You are one of my top guy who always solves of my problem. Thank you so much. ;-)
@valizeth4073
@valizeth4073 2 года назад
You dont need to define your functions before using them, you need to declare them before using them. The linker will take care of the definition, but the compiler still needs a forward declaration to be able to generate the translation unit. It's not an IDE specific thing but a C++ specific thing.
@gautombose4172
@gautombose4172 Год назад
It is time for some one to publish a video showing, function declarations, function definitions in several different files.
@jeffro.
@jeffro. Год назад
Vali Zeth: Yeah, it's those declarations where I always screw up! Thanks for explaining the difference between them and "definitions." I think maybe I wasn't clear on that distinction. At least, I think that's my problem! (Sometimes, in complex code, I can't figure out why it won't compile. The logic is all correct, but I have problems with functions not being declared. I guess I just forget.)
@Steven_Bennett_YT
@Steven_Bennett_YT 3 года назад
Fantastic clarity and more professional than one might expect from an organisation like the BBC! One minor point, after installing platformIO the Atmel AVR platform must be manually installed, it is not there automatically. More videos on PIO please.
@Steven_Bennett_YT
@Steven_Bennett_YT 3 года назад
Actually the relevant platform is installed automatically once the first project is created.
@sunpeter8260
@sunpeter8260 2 года назад
That is another superb tutorial! Thank you for the time and efforts you spent on these!
@user-xh9cj7in3p
@user-xh9cj7in3p 6 месяцев назад
Very nice presentation. Your pace, volume, and editing are first-class, as is the material. Thanks for the education.
@t1d100
@t1d100 2 года назад
Wow! Just used your webpage link to get through the download/install process. The only way you could have made this easier is if you came to my house and you put it on my laptop for me, while I watched and drank a soda and ate potato chips... LOL!!! Amazingly thorough, well written/professional and soooo graciously shared freely = thank you so much!
@jamess1787
@jamess1787 3 года назад
Glad to see you back!
@natrajkamboj
@natrajkamboj 3 года назад
You are such a good/great teacher I hv seen very few like you. This is pure gold tutorial ! thanks so much...
@adilsongoliveira
@adilsongoliveira 3 года назад
Congrats on the tutorial! I found out about your channel today and already subscribed. Extra kudos for running Linux :)
@houtmann774
@houtmann774 Год назад
Thanks for your time and effort in producing truly high quality tutorials. Much appreciated. 👍👍👍
@Rendon276
@Rendon276 3 года назад
Thanks for spelling it all out so concisely.
@BerndSchmitt-Martinique
@BerndSchmitt-Martinique 3 года назад
That is good news Bill. I hope that you will turn more and more to special and advanced stuff. You have done enough BASICs for beginners, A lot of us are already using Platform IO - so it will be much more efficient , to follow your lessons . Greetings from Germany , ( one of your elder students - retired engineer, 1950.)
@noweare1
@noweare1 3 года назад
There's no way you retired in 1950 !
@peterdlynes
@peterdlynes Год назад
Thank you for a very nice introduction to moving over to platformio.
@HowardAlison
@HowardAlison Год назад
Thanks for this. PlatformIO now installed. Looking forward to using a more productive IDE. I'd outgrown the Arduino one without realising it.
Далее
ESP32 Guide 2024 | Choosing and Using an ESP32 Board
41:06
Я читаю переписки сына
00:18
Просмотров 628 тыс.
Introduction to ESP32 - Getting Started
47:57
Просмотров 1,6 млн
Build a Developer's Linux Workstation - Complete Guide
1:28:11
Forget WiFi! This Wireless Method is WAY Better?
12:14
Просмотров 514 тыс.
Driving DC Motors with Microcontrollers
1:04:32
Просмотров 618 тыс.
Getting Started with ESP32 - Step-By-Step Tutorial
19:50
IR Remotes & Microcontrollers - Arduino & ESP32
1:31:50
Просмотров 170 тыс.
PlatformIO: All you need to know in 10 Minutes!
10:56
Просмотров 297 тыс.
Пов: Несёшь цветы маме🥺
0:31
Просмотров 2,2 млн
АРТ-ОБЪЕКТ СО СМЫСЛОМ
0:23
Просмотров 9 млн
Клавиатура для девушек
0:14
Просмотров 1 млн
PRADO 250 - классная машина!
0:28
Просмотров 2,5 млн