Due to a recurring disliking for VSCode, here's a list of possible integrations of PIO. I also switched to VSCodium since then, which I can highly recommend. So now you can stop spamming "Micro$soft bad" under this video about PlatformIO, because it is completely unrelated to Micro$oft on its own, see below: VSCodium (VSCode minus Microsoft) Atom Cloud9 Codeanywhere Eclipse Che CLion CodeBlocks Eclipse Emacs NetBeans Qt Creator Sublime Text Vim Sourced from: platformio.org/install/integration Enjoy!
vscode, atom, cloud9, codeanywhere,eclipse, clion, codeblocks, emacs,netbeans, qt creqtor, sublime, vim all are just terrible, unusable, impractical, electron based or use 10gb of ram for a hello world, all the positive things that platformio could bring to the table are negated by the awful choice of integrations
@@PokettoMusic That's about every editor that is available, so I wonder what isn't terrible, unusable, impractical, electron based or RAM-hungry. Surely tools like vim, emacs and clion clearly stood the test of time in both a hobbyist and professional context. Oh and to add to that: the PIO core CLI makes all commands of PIO usually used in the UI available as command line tools, which means that you can write your code in nano or notepad and directly compile and upload from the terminal, no 3rd party editor involved.
I have to say that I loved your fast tutorial. I was overwhelmed by all the VScode buttons, windows, things opening and closing, files and folders, blablabla... and you solved it in 10 minutes. No waiting times for you writing down hello world code letter by letter, just focus on what is relevant for the topic. good job
Thank you! I am an experienced developer on microprocessors but haven’t used vscode or platformio before. Usually when I try to learn something new, I have to sit through “what is binary”, and “why use a microprocessor”, etc., with about 2 minutes left over for the topic! Thanks for understanding that not everyone is a newbie and doesn’t need binary explained! It looks like your channel is new so I hope for more content like this. Subscribing…..NOW!
I have tied PlatformIO on and off for over a year, and I have to say it is a mixed bag. Its biggest advantage is that it allows each project to have specified versions of libraries; this is advantageous if you have an older project that will break if a newer version of a library is used with it. Otherwise, it adds it own quirks and moderate learning curve. There are subtle gotchas that someone else commented about.
@@NithinJune That's what drove me from the ArduinoIDE to this video. Apart from that, I was confused that the ArduinoIDE just tries to compile everything within that folder. It seems like they don't want somebody to program something, which is much bigger than a small program within one file. Doesn't PlatformIO even enable you to take more control about the Language standard you are actually using? I didn't find the gotchas, yet. Which one does qCNC K mean? Is there any danger, that code might not be compileable in the future?
you can even set a dependency in lib_deps to be dependent on a specfic commit hash of a git repo if there aren't version tags for that lib i hate having to play the guessing game which libs and version a project needs so i wish everyone would use platformio because of dependency management. even more than autocomplete i use the code navigation to quick browse into the libs (control + click on function name) and like in a web browser i can click the side button on my mouse to go back feels more like linux where packages describe what exactly they depend on ...
Your video provided my first exposure to PlatformIO. Your presentation style is very informative, and your dry sense of humor is very funny! Following your video I was up and running in PlatformIO (had to install Visual Studio Code first) within about an hour. Excellent video!
This is a perfect introduction for me! I'm not new to microcontrollers, nor development, nor VS Code - I just wanted to know about PlatformIO specifically, and you did that in 10 minutes!
I don't know how the Arduino "IDE" is nowadays (haven't used it in ages), but last time I did, calling itself an "IDE" was an insult to all actual IDEs.
I used it years ago and then installed it to use it a few months ago and it had regressed. I am unsure how they managed that, but they did. I was mortified.
The best thing that Arduino IDE has going is that the serial terminal is no nonsense and quick. PlatformIO takes longer to start and is a bit more difficult to use when using the terminal a lot during testing. It's nice to have it auto stop and restart between uploading.
I do agree that PIO has a bottleneck at every uploading cycle. That becomes noticeable when you only make small changes and need to upload often within a short time. It starts to get annoying. However, i can't see how any developer would choose a fast serial terminal over code completion, multiple supported platforms, debugging compatibility and more.
@@jse-shack825 right? I use PIO exclusively now and keep an Arduino window open only for the terminal. Unfortunately, most lightweight terminal apps all send line after each character entry not when return is sent, so it's still the best option when in early development. The PIO library management is great and also got, being able to compile for multiple targets and upload with the hex that's for the right target is absolute gold
Your clear explanation rescued me from days of frustration battling a persistent bug. While my Arduino functioned flawlessly when I utilized the Arduino IPA to upload the code, I encountered complete silence when attempting to do so through VSCode Platform IO. I discovered that the solution lied in crafting my own code within main.cpp rather than simply creating a folder with a name and a file with the name.ino extension. Your guidance was invaluable. Thank you!
Thanks so much for this tutorial! I wanted to try a new IDE other than Arduino and I found the Visual Code to be appealing but overwhelming. This IDE is feature-packed but yes, it can be tricky. I enjoyed this tutorial even though I'm still such a newbie and need to figure out a couple things still, but this is a great start for me.
I appreciate this vid -- "beginner moves on to intermediate." I'm an Arduino IDE user whose Mac dev machine crashed, giving me the "opportunity" to start fresh... I chose to use a Pi400 with a clean install of Bookworm, the Arduino IDE, and vscode, but I had only a vague idea (with advice from bard) that PlatformIO fit into the MCU picture. This vid was ideal, thank you.
I installed PIO but when i make a serial monitor based projects in esp32 devkitc v4 i cant get any text its just only rts off dts off poweron reset etc. can anyone help me
Excellent presentation. Thanks for cutting through the BS and delivering the facts clearly with examples. Refreshing to see something in this format, considering what tends to make up most of today's RUclips environment
I just started programming Arduino and my favorite approach so far is make + arduino cli. As a 11y of experience in software engineering I don’t like being attached to any IDE (click, drag n drop)… I have my reasons… But I will take a look on platformio cli, seems interesting. Thank you.
That's what I love about PIO, the core CLI basically lets you choose any editor, because editing and compiling/flashing/debugging are two entirely separate processes. The core CLI can even do wild stuff like remote flashing and unit testing, which requires a PIO account. Did that with a remote Raspberry Pi which had an ESP32 connected on-site, making me able to flash new firmware remotely, almost like OTA updates without the usual OTA stuff.
It should be pointed out, that platformio is not part of vscode. The vscode-platformio-extention make use of platformio and add a nice IDE integration.
I have a problem with plataformio, after clean and build my project when I try to run it in the terminal it appears this message "main.cpp:1:10: fatal error: Arduino.h: No such file or directory #include ^~~~~~~~~~~ compilation terminated." does anyone know how to solve this
Adding mySql database connectivity to a project. PlatformIO started complaining over non compilable libraries. Loading the same project in Arduino IDE, compiling was no problem at all. So how's that for awkward.
compiling without problems... did you even had a thought that if you don't have any warnings\errors it doesn't mean that you have everything work as expected?
I tried the most recent Arduino ide a few days ago, it seems like a massive improvement on the original. Still vs is probably better, need to try platform io.
A linking tutorial would be very helpful. I cannot get it to consistently link libraries and dependencies. It seems to parse them some projects yet not for others and I cannot figure out why. Searching web I see a lot of forum posts with similar linking issues. It's to point where coding is almost pointless because it won't link certain things. Yet Arduino despite being a very crude IDE has no issues linking.
How do you get the example projects from Arduino IDE to a PratformIO project. In the Arduino IDE all the code one needs is 2 clicks away. How do I get anything here?
Click the PIO symbol on the left (if you're using VSCodium), click "Open" in the "Quick Access" menu and you will then see the main page of PlatformIO. Next to the logo, 4 buttons will appear: "New Project", "Import Arduino Project", "Open Project" and "Project Examples". Hope you can spare an extra click; I counted 3
Could you please make a tutorial on splitting code in Platform IO? There is no good place to learn that. Everywhere I looked, they were saying that it's the same as in the normal CPP but I still can't do stuff like global variables and libraries. I would greatly appreciate a tutorial covering that topic.
Yes that would be great, I've spent hours trying to migrate my code from arduino ide to vs code but eventually gave up and now I'm still using arduino.
You should give the Arduino IDE a new look. It's now a full fledged development environment with a dark mode, syntax highlighting. More of the tools are easier to use and it's much faster than the old version. IDF is now fully supported.
Have you been able to use the intellisense feature for the HAL? When I use it with STM32 cube framework, everything works, compiles, builds, etc, except accessing the HAL itself(header / source files). I've seen plenty of pp complaining already but no solution, so I wonder what was Hou experience with it. Thanks!
Can you generate for me code of trafic to communiacat at four way where by they are 4 esp and led green, yellow, led at four way one esp to act as master
I'm all for improvements over the arduino IDE. But why swap it for another crap one ? VSC is awful with it's hard-to-read text, split-pane view, and annoying memory of distant projects. I want to divide my screen up sensibly with overlapping, indefinitely-sized windows, readable text and projects that stay separate.
Two issues you have not mentioned when migrating from original IDE. The "porting" of existing Arduino projects, where you have to move functions above 'loop' and some/old libraries incompatibilities (Newhaven lcd comes to mind). I use vscode with Arduino plugin. Better than original Arduino ide but no issues like with pIO.
re: moving functions -- that's just how real C++ programming works. In Arduino C++, the IDE "automagically" performs function hoisting for you, adding invisible forward declarations at the beginning of your file, which is not standard/real C++. To do this properly, you should have a header file with the declarations of your functions, which is what you need in PlatformIO. You can't really fault it for being more like a standard C++ compiler in that way.
platformIO better. cause can more. i can say: i want esp32 with arduino framework. and i can say: i want esp32 with the original sdk. i can say i want some stm32 contoller with arduino framework, or with MORE other SDK's and real time operating system frameworks they support with that board ... and i just need to write ONE ini file to automatic download and configure all that complicated toolchain stuff...
@@Henry-sv3wv exactly, you automatically get OUTDATED, old libraries and toolchains, especially for the ESP8266, and probably for ESP32 also. If you want to do something, none of the official documentation will work, because platformio has outdated things.
For some reason Platform IO gives me a ton of headaches. It is wonderous when it is working, godlike when working seamlessly. But, maybe it is just settings on my computer. I spent a week reading internet searches, playing around with my Windows PATH. Installing two drivers. And I finally having it working okay again as of yesterday. But. during the six months after discovering PIO, I also found Visual Micro. Which is an extension for MS Visual Studio (NOT VS Code!). The only framework it uses as of now is Arduino. But it gives you all of the power of the Goliath of a program Visual Studio, and the ease of folder and file management. I need to say, with it being a paid software, and that I have a paid version, I am happy with it. But I have high hopes for the potential of Platform IO. And I will tame the beast and have it working seamlessly without interruptions sooner or later. Chasing bugs and conflicts or issues goes with the territory.
Its too complicated and bloated of an editor just for a simple microcontroller. The worst you not mentioning is sometimes it works sometimes you have to fiddling around just to make the same project work again just because you edit your code. I've been trying to migrate to platformio but after a long time and a lot of struggle i give up
Platform IO seems to have a steep learning curve and I haven’t seen the need to use it yet. I do like some of the Eclipse-based IDE’s used to support STM32, ESP32, and other devices.
What is the difference between PlatformIO extension and the EspressIF IDF extension? I want to use VS Code (instead of the EspressIF IDF environment), but when I install/configure the extension, it keeps looking for the IDF before installing the IDF! I tried installing IDF/Tools directly (esp-idf-tools-setup-online-2.20).. and compiling via the command prompt works fine (idf_py build), yet VS Code IDF extension still does not see it! Any plans to do debug using a JTAG programmer? I bought an FT2232HL device (ESP-Prog), pointed it to the WinUsb driver (via Zadig), but how does debugging work ? For example, does it automatically start OpenOCD and load the elf file onto the ESP32? And if you unplug/plug, does the last debug program run, or was the debugger running out of RAM?
Yes - 15 steps to just start an actual project. I can see how that's far superior to the Arduino IDE's automatic opening of a new project or the last opened one.
The serial monitor is imo the best part of PlatformIO. It supports ANSI commands so you can do colors and move the cursor around. It's so much better than the garbage that came with Arduino IDE 1.
PIO core CLI makes you able to compile and run your code from any terminal. If you dislike its or its editor's UI then you can completely bypass it that way.
SO basically yolu still manually write the CPP code for the Arduino and then uploadc it but you just add a lot of complexity to how it is configured and managed... Perhaps interesting if you work on multiple platforms, but if you're a Die Hard Arduino user, then this is overkill....
I still program in assembler. and yes!, my software is not portable anymore, but i can duplicate my ideas any time to spare memory. Why making a program wasting 2MB when can be done in 1KB. Lazy people waste more memory
One thing I find very annoying when using the Mega2560 is that accessing flash above 64KB requires use of a 24 bit address to cater for the 256KB flash. In the standard Arduino IDE this is a cludgy solution requiring conversion to far addresses (from what are compiler known 16 bit addresses). Does platformIO, or any other compiler that you are aware of, deal with this in a more orthodox manner wherein full addresses can be specified on 2560. It would also mean that things like a 2D array of characters in flash would be possible. At the moment, in Arduino IDE, this cannot be done because all addresses are treated as is 16bit so a 2D array has address bits missing. The pgm_get_far_address that converts 16 bit to 24 bit (actually 32bit) appears to go behind the scenes and essentially ask the linker - hey where is this really as there are address bits missing. Painful. Geoffrey, NZ
I agree Sir!! Arduino is so slow too... VS Code can do anything with extensions. It can run many different platforms and environments. Good code/file: reader, editor, testing, debugging, creating, compiling, and burning program. And runs efficient and fast. Faster build and test than Arduino IDE. Although Arduino is a really good system, It feels like everything about Arduino is 8 bits. Even their app.
If you are looking for speed, PIO is not the right choice, but a specific build chain for your target controller. This, as the name implies, comes at the cost of working for one controller family only. PIO is a good tool to stay flexible and multi-purpose, allowing you to run parts of your project in the context of VSCode rather than just embedded firmware, such as the preview of an embedded web server or code generating python scripts.
It is, but I believe that everybody who is capable of programming a microcontroller reaches the limit of the Arduino IDE after about 3 projects with it. PIO is the next step on your embedded systems journey.
Very nice. i find VSCode better to use than Arduino IDE for my ESP32 development. I always thought the PlatformIO logo was of an ant head, not an alien?
Due to a recurring disliking for VSCode, here's a list of possible integrations of PIO. I also switched to VSCodium since then, which I can highly recommend. So now you can stop spamming "Micro$soft bad" under this video about PlatformIO, because it is completely unrelated to Micro$oft on its own, see below:
VSCodium (VSCode minus Microsoft)
Atom
Cloud9
Codeanywhere
Eclipse Che
CLion
CodeBlocks
Eclipse
Emacs
NetBeans
Qt Creator
Sublime Text
Vim
Sourced from: platformio.org/install/integration
Enjoy!
Atom is end of life.
vscode, atom, cloud9, codeanywhere,eclipse, clion, codeblocks, emacs,netbeans, qt creqtor, sublime, vim
all are just terrible, unusable, impractical, electron based or use 10gb of ram for a hello world, all the positive things that platformio could bring to the table are negated by the awful choice of integrations
vs code rules
you are a star!
@@PokettoMusic That's about every editor that is available, so I wonder what isn't terrible, unusable, impractical, electron based or RAM-hungry. Surely tools like vim, emacs and clion clearly stood the test of time in both a hobbyist and professional context.
Oh and to add to that: the PIO core CLI makes all commands of PIO usually used in the UI available as command line tools, which means that you can write your code in nano or notepad and directly compile and upload from the terminal, no 3rd party editor involved.
I have to say that I loved your fast tutorial.
I was overwhelmed by all the VScode buttons, windows, things opening and closing, files and folders, blablabla... and you solved it in 10 minutes. No waiting times for you writing down hello world code letter by letter, just focus on what is relevant for the topic.
good job
Thank you! I am an experienced developer on microprocessors but haven’t used vscode or platformio before. Usually when I try to learn something new, I have to sit through “what is binary”, and “why use a microprocessor”, etc., with about 2 minutes left over for the topic! Thanks for understanding that not everyone is a newbie and doesn’t need binary explained! It looks like your channel is new so I hope for more content like this. Subscribing…..NOW!
Me2!
@@DataBoy1957Me10😂
@@paulfrost8952 Binary is as easy as 01, 10, 11. LOL
I have tied PlatformIO on and off for over a year, and I have to say it is a mixed bag. Its biggest advantage is that it allows each project to have specified versions of libraries; this is advantageous if you have an older project that will break if a newer version of a library is used with it.
Otherwise, it adds it own quirks and moderate learning curve. There are subtle gotchas that someone else commented about.
i mean its indispensable for me because of the intellesense, autocomplete, linting, etc.
@@NithinJune That's what drove me from the ArduinoIDE to this video. Apart from that, I was confused that the ArduinoIDE just tries to compile everything within that folder. It seems like they don't want somebody to program something, which is much bigger than a small program within one file.
Doesn't PlatformIO even enable you to take more control about the Language standard you are actually using?
I didn't find the gotchas, yet. Which one does qCNC K mean? Is there any danger, that code might not be compileable in the future?
you can even set a dependency in lib_deps to be dependent on a specfic commit hash of a git repo if there aren't version tags for that lib
i hate having to play the guessing game which libs and version a project needs so i wish everyone would use platformio because of dependency management.
even more than autocomplete i use the code navigation to quick browse into the libs (control + click on function name) and like in a web browser i can click the side button on my mouse to go back
feels more like linux where packages describe what exactly they depend on ...
To the point and delivered with dry humor and sarcasm. What more could a person want? Great job!
As someone who is just slowly getting started in the Arduino/ESP world, you are exactly the type of RUclipsr you need. Thanks !
I came here for the knowledge, stayed for pure content. Love your attitude man, hope to see more videos soon!
Your video provided my first exposure to PlatformIO. Your presentation style is very informative, and your dry sense of humor is very funny! Following your video I was up and running in PlatformIO (had to install Visual Studio Code first) within about an hour. Excellent video!
This is a perfect introduction for me! I'm not new to microcontrollers, nor development, nor VS Code - I just wanted to know about PlatformIO specifically, and you did that in 10 minutes!
Great video. Finally, someone who realises we are not all new developers. I'll be watching a lot more of your videos. Thanks.
I don't know how the Arduino "IDE" is nowadays (haven't used it in ages), but last time I did, calling itself an "IDE" was an insult to all actual IDEs.
The most advanced feature it has today is code suggestion. It works about 1/4 of the time and is still technically an experimental feature.
@@georgertheexplorer4114 isn't there arduino ide 2.0 based on vscode?
@@mdev790 hope not. VS code is shit.
The new 2.0 isn't half bad tbh. It has potential
I used it years ago and then installed it to use it a few months ago and it had regressed. I am unsure how they managed that, but they did. I was mortified.
The best thing that Arduino IDE has going is that the serial terminal is no nonsense and quick. PlatformIO takes longer to start and is a bit more difficult to use when using the terminal a lot during testing. It's nice to have it auto stop and restart between uploading.
I do agree that PIO has a bottleneck at every uploading cycle. That becomes noticeable when you only make small changes and need to upload often within a short time. It starts to get annoying. However, i can't see how any developer would choose a fast serial terminal over code completion, multiple supported platforms, debugging compatibility and more.
@@jse-shack825 right? I use PIO exclusively now and keep an Arduino window open only for the terminal. Unfortunately, most lightweight terminal apps all send line after each character entry not when return is sent, so it's still the best option when in early development. The PIO library management is great and also got, being able to compile for multiple targets and upload with the hex that's for the right target is absolute gold
@@phantomhck realterm?
Oh man thank you ! Finally a video that explains what I didn't get before: being able to understand what to do within Visual Studio Code & platform IO
Subbed.
Absolutely GOATED video.
Pacing, information, humor, all on point!
Well, I HAVE still been using the arduino IDE, but I got only a minute through your overview, and said, I need this!
Great, short tell-it-all.
Your clear explanation rescued me from days of frustration battling a persistent bug. While my Arduino functioned flawlessly when I utilized the Arduino IPA to upload the code, I encountered complete silence when attempting to do so through VSCode Platform IO. I discovered that the solution lied in crafting my own code within main.cpp rather than simply creating a folder with a name and a file with the name.ino extension. Your guidance was invaluable. Thank you!
Thanks so much for this tutorial! I wanted to try a new IDE other than Arduino and I found the Visual Code to be appealing but overwhelming. This IDE is feature-packed but yes, it can be tricky. I enjoyed this tutorial even though I'm still such a newbie and need to figure out a couple things still, but this is a great start for me.
Serial monitor does not automatically open after uploading. What's the issue here? First time using VS
I appreciate this vid -- "beginner moves on to intermediate." I'm an Arduino IDE user whose Mac dev machine crashed, giving me the "opportunity" to start fresh... I chose to use a Pi400 with a clean install of Bookworm, the Arduino IDE, and vscode, but I had only a vague idea (with advice from bard) that PlatformIO fit into the MCU picture. This vid was ideal, thank you.
Brilliantly jam packed video with golden information. Thanks my man!
Can you demonstrate RPI Pico development and debug using Platform IO ?
thanks, all 10 minutes worth the time. even though i am new to this, i like it more if there is one video for one topic and not a huge explain-it-all.
I installed PIO but when i make a serial monitor based projects in esp32 devkitc v4 i cant get any text its just only rts off dts off poweron reset etc. can anyone help me
Excellent presentation. Thanks for cutting through the BS and delivering the facts clearly with examples. Refreshing to see something in this format, considering what tends to make up most of today's RUclips environment
no bullshit direct honest video, no fancy dangy dingy shit. SUBSCRIBED!!!
i have a problem when my serial monitor is open and i upload code. i get permission error i doesn't work like yours
I just started programming Arduino and my favorite approach so far is make + arduino cli.
As a 11y of experience in software engineering I don’t like being attached to any IDE (click, drag n drop)… I have my reasons…
But I will take a look on platformio cli, seems interesting.
Thank you.
That's what I love about PIO, the core CLI basically lets you choose any editor, because editing and compiling/flashing/debugging are two entirely separate processes. The core CLI can even do wild stuff like remote flashing and unit testing, which requires a PIO account. Did that with a remote Raspberry Pi which had an ESP32 connected on-site, making me able to flash new firmware remotely, almost like OTA updates without the usual OTA stuff.
Great video, but in the Arduino IDE I get great use out of the library examples accessible via the IDEs menu. Is that possible in PlatformIO?
Proper video mate! many thanks, keep it up legend!
It's a great a software, but for beginners I thinks AIDE is better just because is more simple to use. Right?
As soon as you assumed I wasn't an idiot, I subscribed. Thank you!
It should be pointed out, that platformio is not part of vscode. The vscode-platformio-extention make use of platformio and add a nice IDE integration.
No, it shouldn't
Just like it shouldn't be stated that Windows/Linux is a part of HDD/SSD
I have a problem with plataformio, after clean and build my project when I try to run it in the terminal it appears this message "main.cpp:1:10: fatal error: Arduino.h: No such file or directory
#include
^~~~~~~~~~~
compilation terminated." does anyone know how to solve this
Have a look at my warnings re this sort of thing when using vs**** - @joeking5211
I'd love to see that video on unit testing! It seems like a super helpful tool, but is currently pretty confusing
Adding mySql database connectivity to a project. PlatformIO started complaining over non compilable libraries. Loading the same project in Arduino IDE, compiling was no problem at all. So how's that for awkward.
compiling without problems...
did you even had a thought that if you don't have any warnings\errors it doesn't mean that you have everything work as expected?
I tried the most recent Arduino ide a few days ago, it seems like a massive improvement on the original. Still vs is probably better, need to try platform io.
guyz help me
when i switch to platform io it work but is show a lot of cmd apps
how to get read of them
A linking tutorial would be very helpful. I cannot get it to consistently link libraries and dependencies. It seems to parse them some projects yet not for others and I cannot figure out why. Searching web I see a lot of forum posts with similar linking issues. It's to point where coding is almost pointless because it won't link certain things. Yet Arduino despite being a very crude IDE has no issues linking.
I would like to program an esp8266 to control my mini CNC I just built.
Hello i am new on vs code have project but could not remove errors can anyone help
How do you get the example projects from Arduino IDE to a PratformIO project. In the Arduino IDE all the code one needs is 2 clicks away. How do I get anything here?
Click the PIO symbol on the left (if you're using VSCodium), click "Open" in the "Quick Access" menu and you will then see the main page of PlatformIO. Next to the logo, 4 buttons will appear: "New Project", "Import Arduino Project", "Open Project" and "Project Examples". Hope you can spare an extra click; I counted 3
@@jse-shack825 Thanks a lot
Love it! And I subscribed. Best wishes, and thank you for expanding my tool kit.
Could you please make a tutorial on splitting code in Platform IO? There is no good place to learn that. Everywhere I looked, they were saying that it's the same as in the normal CPP but I still can't do stuff like global variables and libraries. I would greatly appreciate a tutorial covering that topic.
Congrats, you just predicted what the next video will be about.
@@jse-shack825 oh I love it. I've spent like 6 hours researching this topic and still know nothing about it.
@@jse-shack825 any idea when you'll get.git.got around to it?
Yes that would be great, I've spent hours trying to migrate my code from arduino ide to vs code but eventually gave up and now I'm still using arduino.
Thank you for the video - very well put-together!
You should give the Arduino IDE a new look. It's now a full fledged development environment with a dark mode, syntax highlighting. More of the tools are easier to use and it's much faster than the old version. IDF is now fully supported.
Have you been able to use the intellisense feature for the HAL? When I use it with STM32 cube framework, everything works, compiles, builds, etc, except accessing the HAL itself(header / source files). I've seen plenty of pp complaining already but no solution, so I wonder what was Hou experience with it. Thanks!
You explained this so well I have subscribed to your channel.
Can i use a git hub code originally made for arduino in esp 32 ?
Dudeee, your content is the shit! An instant subscriber.
that means u put ur .h files in the lib file and in the include file?
but it cannot debug arduino DUE right?
Nice. Would you know how to change the font face in terminal? Cheers
I didn’t see the .ino file, is that unnecessary for the project?
This great job brother, Thank you very much indeed.
WHJAT VERSION VSC CODE IT WORKS WITH
Nice tutorial Sir, hope we get more in-depth platformIO tutorial
Can you generate for me code of trafic to communiacat at four way where by they are
4 esp and led green, yellow, led at four way one esp to act as master
I used Platformio when I compile code for SKR 32 Bit Control Board with marlin firmware. Very useful..
what about Arduino bootloaders on Arduino cards, and AVR chips?, what if I need to use an Attiny85?
I'm all for improvements over the arduino IDE. But why swap it for another crap one ? VSC is awful with it's hard-to-read text, split-pane view, and annoying memory of distant projects. I want to divide my screen up sensibly with overlapping, indefinitely-sized windows, readable text and projects that stay separate.
If only i could give your comment a 1000 ticks I would. Yes what a joke VS**** is, if only PIO could be used with another IDE it could be superb.
Two issues you have not mentioned when migrating from original IDE. The "porting" of existing Arduino projects, where you have to move functions above 'loop' and some/old libraries incompatibilities (Newhaven lcd comes to mind). I use vscode with Arduino plugin. Better than original Arduino ide but no issues like with pIO.
re: moving functions -- that's just how real C++ programming works. In Arduino C++, the IDE "automagically" performs function hoisting for you, adding invisible forward declarations at the beginning of your file, which is not standard/real C++. To do this properly, you should have a header file with the declarations of your functions, which is what you need in PlatformIO. You can't really fault it for being more like a standard C++ compiler in that way.
platformIO better. cause can more.
i can say: i want esp32 with arduino framework. and i can say: i want esp32 with the original sdk.
i can say i want some stm32 contoller with arduino framework, or with MORE other SDK's and real time operating system frameworks they support with that board ...
and i just need to write ONE ini file to automatic download and configure all that complicated toolchain stuff...
@@Henry-sv3wv exactly, you automatically get OUTDATED, old libraries and toolchains, especially for the ESP8266, and probably for ESP32 also. If you want to do something, none of the official documentation will work, because platformio has outdated things.
For some reason Platform IO gives me a ton of headaches. It is wonderous when it is working, godlike when working seamlessly. But, maybe it is just settings on my computer. I spent a week reading internet searches, playing around with my Windows PATH. Installing two drivers. And I finally having it working okay again as of yesterday. But. during the six months after discovering PIO, I also found Visual Micro. Which is an extension for MS Visual Studio (NOT VS Code!). The only framework it uses as of now is Arduino. But it gives you all of the power of the Goliath of a program Visual Studio, and the ease of folder and file management. I need to say, with it being a paid software, and that I have a paid version, I am happy with it. But I have high hopes for the potential of Platform IO. And I will tame the beast and have it working seamlessly without interruptions sooner or later. Chasing bugs and conflicts or issues goes with the territory.
But what's better than arduino ide?
So can you set this up for pic micro or not as yet to be used pic kit 3 / 4
Thank you so much to not go over flowers and bees when describing some extension and cutting right to the chase 👍
Its too complicated and bloated of an editor just for a simple microcontroller. The worst you not mentioning is sometimes it works sometimes you have to fiddling around just to make the same project work again just because you edit your code. I've been trying to migrate to platformio but after a long time and a lot of struggle i give up
I agree. Bloated and unnecessary
Platform IO seems to have a steep learning curve and I haven’t seen the need to use it yet. I do like some of the Eclipse-based IDE’s used to support STM32, ESP32, and other devices.
I never comment on videos, but this was a great video. Thank you
What is the difference between PlatformIO extension and the EspressIF IDF extension?
I want to use VS Code (instead of the EspressIF IDF environment), but when I install/configure the extension, it keeps looking for the IDF before installing the IDF! I tried installing IDF/Tools directly (esp-idf-tools-setup-online-2.20).. and compiling via the command prompt works fine (idf_py build), yet VS Code IDF extension still does not see it!
Any plans to do debug using a JTAG programmer? I bought an FT2232HL device (ESP-Prog), pointed it to the WinUsb driver (via Zadig), but how does debugging work ? For example, does it automatically start OpenOCD and load the elf file onto the ESP32?
And if you unplug/plug, does the last debug program run, or was the debugger running out of RAM?
it took over half an hour before i cancet it on my new pc
is that still normal?
This a gem of a video
just use arduino ide pro 2.0? yes it's sill under dev, but it does the job?
What about git support?
yes:
ruclips.net/video/u9ZQpKGTog4/видео.html
Did it still not working in Linux free vscode ?!!!
Yes - 15 steps to just start an actual project. I can see how that's far superior to the Arduino IDE's automatic opening of a new project or the last opened one.
The serial monitor is imo the best part of PlatformIO. It supports ANSI commands so you can do colors and move the cursor around. It's so much better than the garbage that came with Arduino IDE 1.
Useful and funny as well!! Thanks.
Why not just use the CLI interface at the command line of your terminal?
PIO core CLI makes you able to compile and run your code from any terminal. If you dislike its or its editor's UI then you can completely bypass it that way.
SO basically yolu still manually write the CPP code for the Arduino and then uploadc it but you just add a lot of complexity to how it is configured and managed... Perhaps interesting if you work on multiple platforms, but if you're a Die Hard Arduino user, then this is overkill....
i feel blind without code navigation:
ruclips.net/video/MuQmMsIpI04/видео.html
I still program in assembler. and yes!, my software is not portable anymore, but i can duplicate my ideas any time to spare memory. Why making a program wasting 2MB when can be done in 1KB. Lazy people waste more memory
@@soulrobotics and the best part is .... his actual CODING is still done exactly in the sae way, he just adds wrappers and layers. You a re so RIGHT !
Can I use same procedure for linux ?
Sure!
Great video, wish I had found it ages ago!
What’s wrong with ESP-IDF? You don’t get access to everything using the arduino framework.
One thing I find very annoying when using the Mega2560 is that accessing flash above 64KB requires use of a 24 bit address to cater for the 256KB flash. In the standard Arduino IDE this is a cludgy solution requiring conversion to far addresses (from what are compiler known 16 bit addresses). Does platformIO, or any other compiler that you are aware of, deal with this in a more orthodox manner wherein full addresses can be specified on 2560. It would also mean that things like a 2D array of characters in flash would be possible. At the moment, in Arduino IDE, this cannot be done because all addresses are treated as is 16bit so a 2D array has address bits missing. The pgm_get_far_address that converts 16 bit to 24 bit (actually 32bit) appears to go behind the scenes and essentially ask the linker - hey where is this really as there are address bits missing. Painful.
Geoffrey, NZ
I agree Sir!! Arduino is so slow too... VS Code can do anything with extensions. It can run many different platforms and environments. Good code/file: reader, editor, testing, debugging, creating, compiling, and burning program. And runs efficient and fast. Faster build and test than Arduino IDE. Although Arduino is a really good system, It feels like everything about Arduino is 8 bits. Even their app.
If you are looking for speed, PIO is not the right choice, but a specific build chain for your target controller. This, as the name implies, comes at the cost of working for one controller family only. PIO is a good tool to stay flexible and multi-purpose, allowing you to run parts of your project in the context of VSCode rather than just embedded firmware, such as the preview of an embedded web server or code generating python scripts.
Arduino ide is straightforward
It is, but I believe that everybody who is capable of programming a microcontroller reaches the limit of the Arduino IDE after about 3 projects with it. PIO is the next step on your embedded systems journey.
Thanks a lot! This is the best guide!
Gee you like complexity, IDE 's can be difficult to use like anything easy when you know how. I like the Arudino interface
arch linux, vscode doesn't show platformio
Try to use operating system from 21th century at first
I with they would offically support sublime text, I feel it is a much better and lighter editor than vscode.
They are Editor agnostik. Work with any Editor. Just depend on how much you need to do in a shell.
Brilliant content. Helpfun and entertaining. Subscribed.
very nice video.
based on his intresting humor. i think this guy is from deutsland ( germany ) ?
Good video, but I don't understand why you didn't think of swapping your "Visual Studio Code" for "VSCodium" ?!
plattformio is totally overloaded. if you click somewhere, something new is constantly being started. i hate it
But without thousands of libraries how do you make anything work?
this is really great!!
can you do full wireless network project with Arduino uno?
Excellent Video. Thanks for sharing. Where do we put libraries that will be used by many projects. Edit: I think I have it hand
But I have a Mac, not a PC! So, what are my options on a Mac platform?
VSCode is downloadable for a Mac, and PlatformIO is advertised as both Intel Mac and Apple Silicon compatible.
(High pitched fake voice from way in the back): What about ATTiny?
And now an project with more then 1 source file.
It's in the arduino ide piece of cake, however in platformio a nightmare.
Make a video on that.
Quite the opposite of a nightmare: ruclips.net/video/_84rkq9a5jE/видео.html
Very nice. i find VSCode better to use than Arduino IDE for my ESP32 development. I always thought the PlatformIO logo was of an ant head, not an alien?
Does not work with VSCodium... back to Arduino IDE