Getting Started wit...
 
Notifications
Clear all

Getting Started with PlatformIO

74 Posts
32 Users
28 Likes
10.4 K Views
(@maxli)
Member
Joined: 3 years ago
Posts: 36
 

Thanks for sharing, it would be nice to have more videos.


   
ReplyQuote
WAMagee
(@wamagee)
Member
Joined: 3 years ago
Posts: 183
 

Notice this thread has been inactive for awhile but maybe it can came back to life.

Why I am here. 

Awhile back I started a thread "Introducing Myself with my irrigation project" and to say the least this is going to be a respectable size project. There is going to be a lot of hardware and lots of code (sketches) to tie it all together.

My initial testing has been done under the Ardunio IDE that I felt comfortable with. But then a few weeks ago I run into Bill's video on PlatformIO and liked what I saw. Some features in particular the debugger, project control, library control and the code editor are nice. Was very busy then and put it on the back-burner.

These are all things I was use to in my 30yr Systems/Software development career that I retired from 12 years ago leaving me rusty but tons of experience. None of which was with Micro-controllers, NONE!

So I was waiting for some hardware and took advantage of time jumping into PlatformIO.

I followed through Bill's video until he went off from Arduino Uno to ESP32. At this point I only have the Arduino.

So I created a couple projects of my own.  One was to test the JSN-SR04T Waterproof Ultrasonic Distance Sensor and another to simply shut the Arduino down. But adding the projects seemed to raise issues and then cause problems.

On issue was PlatformIO was not always happy when the Arduino was running. And that is understandable. But next it seemed no matter what I did the code uploaded VIA PlatformIO for the JSN-SR04T project could not be evicted. I would try and upload the simple Blink code and the code just to shut the Arduino down and I could see in the serial output the JSN-SR04T still running. So I just played with one thing after another and found that I could put intentional coding errors in the two simpler sketches and the compiler never cared.

So then I finally noticed on bottom of PlatformIO Panel something about a default project.

Default Issue

From that I was able to change the default.

Changing Default

That's cool I guess but it seemed from Bill's video that project was changed by selecting a project on left of panel. And on his screens throughout video I see nothing about Default Project.  Don't know what I did to startup this default project thing but it is a pain in the butt. You are working on code, do a compile and you are unaware that it is actually compiling the default project AND not reporting any errors you are making in the code you are working on. 

So does anyone know how to get out of this default project mode? Thanks!

 


   
ReplyQuote
byron
(@byron)
No Title
Joined: 5 years ago
Posts: 1112
 

@wamagee

Hello, we meet on another thread. 😀  I've just started with PlatformIO myself and its a great improvement over the Arduio IDE.  

What I have noticed is that I can open more than one project at once and the last project opened shows as the default project.  The default project can be changed by clicking on it when a list of all those you have opened are shown and you can pick another for the default.

But to save getting myself confused I have tried to find a way to close one of the open projects, but no luck with this.  I have to close VSC down and open it up again, go into PlatformIO and again pick just the project I want to be open.

Maybe someone will let us know if there is a way to close an open project without the more drastic steps I take as above.  

However I think this is the way PlatformIO is designed to work as sometimes its useful to have several project open at the same time, I just hope there may be a way to close some when required. 

As you have been bitten by the 'default project' way PlatformIO works, you will now be on alert to check before the compile and upload options are clicked.


   
ReplyQuote
frogandtoad
(@frogandtoad)
Member
Joined: 5 years ago
Posts: 1458
 

@wamagee 

Posted by: @wamagee

So does anyone know how to get out of this default project mode? Thanks!

Sorry I can't help you with that, as I dislike PlatformIO, I just don't use it.

Having said that, if you do like the VSCode look, feel and functionality, then you might consider trying out the new Arduino IDE (still in development, but has come a long way), which is based on the VSCode IDE framework itself, so it's almost identical in many respects to VSCode, with the difference being that it is being developed specifically for micro controllers such as Arduino.

It still has some bugs, but in my experience with it so far, that they are mostly minor, and hardware dependent.

May be worth a try, and you can download the nightly build (portable version) here:

Nightly Arduino IDE Builds

Cheers.


   
ReplyQuote
WAMagee
(@wamagee)
Member
Joined: 3 years ago
Posts: 183
 
Posted by: @frogandtoad

you might consider trying out the new Arduino IDE

Does it have an interactive debugger?


   
ReplyQuote
frogandtoad
(@frogandtoad)
Member
Joined: 5 years ago
Posts: 1458
 

@wamagee

Posted by: @wamagee
Posted by: @frogandtoad

you might consider trying out the new Arduino IDE

Does it have an interactive debugger?

 Yes, it does, but I don't think your project is that complicated to require one 😉


   
ReplyQuote
WAMagee
(@wamagee)
Member
Joined: 3 years ago
Posts: 183
 
Interactive Code Debuggers
 
Posted by: @frogandtoad

... I don't think your project is that complicated to require one

That is your opinion, and you really don't know enough about what I am doing to offer such an opinion. Some sketches will be simple and others very complicated.

Also please realize that in my 30 years of System/Software development I've seen interactive debuggers as invaluable. As Chief Programmer for Bayer in Pittsburgh, PA I was responsible for finding the sweet point between quality and productivity, always leaning toward quality. I extensively reviewed and advised management on the value of interactive debuggers, this was when they first came out in the early 1980s and were VERY expensive. Even with the cost it was always a "no brainier" that they are worth investing significant $s to buy and significant time to learn how to use!

Engage Brain Before Opening Mouth

   

This post was modified 2 years ago 2 times by WAMagee

   
ReplyQuote
WAMagee
(@wamagee)
Member
Joined: 3 years ago
Posts: 183
 
New Arduino IDE, Thx for Heads-Up!
 
Posted by: @frogandtoad

you might consider trying out the new Arduino IDE

Thanks for the heads-up on this. I've done some exploring and found the following and what I feel to be a very informative YouTube:

Considering something that is being developed as we write Real-Time messages back and forth to one another this is a little dated, Apr 11, 2021. BUT the video has perked my interest and I will be looking for more recent stuff.  If you know of something please let me know. Again thanks for the Heads-Up

This post was modified 2 years ago by WAMagee

   
ReplyQuote
byron
(@byron)
No Title
Joined: 5 years ago
Posts: 1112
 
Posted by: @wamagee

I've done some exploring and found the following and what I feel to be a very informative YouTube:

And here is another video on it for your consideration.  At the time of the video there was still a few niggles, though to be expected for a beta version.  But its been in beta for an awful long time now... makes you wonder.


   
ReplyQuote
WAMagee
(@wamagee)
Member
Joined: 3 years ago
Posts: 183
 

Visual Micro Another IDE with interactive debugging

@frogandtoad @byron

As I dive into IDEs I find more options. Nothing I am for or opposed to just thought placing them in this thread might help others, if they care to, explore other opportunities.  This video on Visual Micro was informative:

 

 


   
ReplyQuote
WAMagee
(@wamagee)
Member
Joined: 3 years ago
Posts: 183
 
Posted by: @byron

And here is another video on it for your consideration.  At the time of the video there was still a few niggles, though to be expected for a beta version.  But its been in beta for an awful long time now... makes you wonder.

Yep a little newer, May 14, 2021, but for now I am sticking with PlatformIO unless there is something a lot closer to today's date that covers its stability. Any thoughts?


   
ReplyQuote
byron
(@byron)
No Title
Joined: 5 years ago
Posts: 1112
 
Posted by: @wamagee

Any thoughts?

I'll be giving the Arduino Pro another look when its out of beta, but currently I'm OK with PlatformIO which I use for the arduino type of project and its just so much better the the arduino IDE of old.  

Most of the programming I have been doing recently has been for home automation projects involving links to sensors, saving data to a mysql database and and controlling relays and camera's etc.  For this I prefer to use Python or Micropython when using microcontrollers like ESP32's etc. and I use Visual Studio Code for this.

 


   
ReplyQuote
WAMagee
(@wamagee)
Member
Joined: 3 years ago
Posts: 183
 
Posted by: @byron

I'll be giving the Arduino Pro another look when its out of beta, but currently I'm OK with PlatformIO which I use for the arduino type of project and its just so much better the the arduino IDE of old.  

I am migrating to PlatformIO as as I get more familiar with it will start looking into the interactive debugger. For sure it will better to first get familiar with the basic IDE before jumping into debugging. Then once the need debugging jumps out it will be less of a learning curve. From some digging it seems easier to get debugger working with ESP32's. And likely even without interactive debugging the ESP32 was in my near future.  Lots more power, lots more features! So the ESP32 is  now on the Front-Burner.

Lots to do and need to start evaluating Soldering Stations and get one of them on a delivery truck heading my way ASAP.

Bill has a great video "Tools for Your Electronics Workbench" I've spent a bit of time studying.  Gotta love Bill!


   
ReplyQuote
frogandtoad
(@frogandtoad)
Member
Joined: 5 years ago
Posts: 1458
 

@wamagee

Posted by: @wamagee
New Arduino IDE, Thx for Heads-Up!
 
Posted by: @frogandtoad

you might consider trying out the new Arduino IDE

Thanks for the heads-up on this. I've done some exploring and found the following and what I feel to be a very informative YouTube:

Considering something that is being developed as we write Real-Time messages back and forth to one another this is a little dated, Apr 11, 2021. BUT the video has perked my interest and I will be looking for more recent stuff.  If you know of something please let me know. Again thanks for the Heads-Up

You're welcome.

Yes, that review is ~6 months old now, and a lot of those issues may have well been resolved by now.  Did you check the Issue Tracker on the link I provided, for the latest issues being reported, and or resolved?

In ether case, it the portable version doesn't cost you anything to play around with it for yourself, to see if it works for you or not... why not just try it and see for yourself what today's version looks and plays like?

Cheers.


   
ReplyQuote
frogandtoad
(@frogandtoad)
Member
Joined: 5 years ago
Posts: 1458
 

@wamagee @byron

Posted by: @wamagee
Posted by: @byron

And here is another video on it for your consideration.  At the time of the video there was still a few niggles, though to be expected for a beta version.  But its been in beta for an awful long time now... makes you wonder.

Yep a little newer, May 14, 2021, but for now I am sticking with PlatformIO unless there is something a lot closer to today's date that covers its stability. Any thoughts?

It's probably stable enough to do what you want... why don't you just try the portable (no installation necessary), version for yourself?

Why are you afraid of testing the latest version?

It can surely help you develop your code, and if there are any critical issues, then just recompile your final version in the traditional IDE or some other IDE.  Eclipse is another mature and well regarded IDE I have also mentioned in the past... have you looked at that at all?

Cheers.


   
ReplyQuote
Page 4 / 5