PlatformIO support?

Pete1061

Active member
I have grown tired of Arduino IDE and switched.
I don't like the way it displays code.
2.0 doesn't look much better.
I prefer the highlighting of VSCode.

Has anyone else switched?
 
...not to PlatformIO but to Visual Studio and Visual Micro.
Try it and you won't look back.
 
Visual Studio is a bit complicated for me. I'm not really a professional. I barely know what I'm doing.
VSCode with PlatformIO seems like the simplified version to me.

But PlatformIO seems problematic with the serial port. Or it may be just Teensy and how it does things, because I have trouble in the Arduino IDE too. I never really know when or if to push the button.
Sometimes the serial monitor keeps crashing on me in both.

This is frustrating. I give up every day. I'm getting too old, my mind isn't what it used to be anymore. I get frustrated too easy.
 
I've been using platformio to build my teensy projects for more than 2 years. It's light years ahead. The only issue is there can sometimes be a lag of a few days between when Paul releases a new version of teensyduino and when it is available in pio.
 
I've been using platformio to build my teensy projects for more than 2 years. It's light years ahead. The only issue is there can sometimes be a lag of a few days between when Paul releases a new version of teensyduino and when it is available in pio.

I echo thebiggs's testimony, overall it's light years ahead. Not only you get rid of the bulky Arduino IDE, with PIO you get full VS Code integration, per-project platform/library/module dependency management, compiling/linking/uploading is made much easier. What I don't like about it is the serial monitor, I personally prefer an external terminal program. However if you need/want to use the latest bleeding edge Teensyduino betas you'll have to repackage them yourself, which is a bit cumbersome -- As thebiggs said, it may take a couple of days/weeks for the PIO team to produce a new Teensyduino package after Paul releases a stable version.
 
Do any of you have a suggestion for an alternative serial monitor?
I find the one in VSC/PIO to be very erratic and it barely works most times.
 
Do any of you have a suggestion for an alternative serial monitor?
I find the one in VSC/PIO to be very erratic and it barely works most times.
I tend to open a new shell then run
Code:
$ ~/.platformio/packages/tool-teensy/teensy_ports
to find the address of the teensy (in my case /sys/devices/pci0000:00/0000:00:14.0/usb1/1-3), then run
Code:
$ ~/.platformio/packages/tool-teensy/teensy_serialmon /sys/devices/pci0000:00/0000:00:14.0/usb1/1-3
Using the split window command in Code I can run the serial monitor next to the build output very conveniently. The above looks very unwieldy, but using bash command history I can get this started by typing <Cntrl-R>teensy<enter> at the bash command line. Works great for me
 
Visual Studio is a bit complicated for me. I'm not really a professional. I barely know what I'm doing.
VSCode with PlatformIO seems like the simplified version to me.

But PlatformIO seems problematic with the serial port. Or it may be just Teensy and how it does things, because I have trouble in the Arduino IDE too. I never really know when or if to push the button.
Sometimes the serial monitor keeps crashing on me in both.

This is frustrating. I give up every day. I'm getting too old, my mind isn't what it used to be anymore. I get frustrated too easy.

When you use Visual Micro (VM) with Visual Studio, VM is presented as another drop down menu. When writing code/programming Teensy all you communicate through is the VM interface. If you can use/understand the Arduino IDE then you can certainly use the VM. So much easier and a better editor.
 
I did just tried Visual Micro for the very first time
all I can say first enable

High speed parallel builds

otherwise the compile times are gonna driving you crazy

Also Visual Micro is not really free
but that could pay back for a better software?

Myself are using VCODE+PlatformIO
and that did also had a learning curve
so I think they are even in that perspective

Do any of you have a suggestion for an alternative serial monitor?
I find the one in VSC/PIO to be very erratic and it barely works most times.

I use "Terminal v1.9b 20130820 - by Br@y++"
note. to use that build the newer one have bugs
and you cannot select text in the receive "TextBox"

The serial monitor in VSCODE only crashes when you do 'restarts'/repluggin
the Teensy,
the serial monitor don't seem to have any error handling of that situation.

The downside of using a external 'serial monitor' is that you loose the automatic reprogram functionality,
as the external 'serial monitor' blocks the serial port used for "automatic reprogram functionality"
so when you need to reprogram you have to first close the port in the external 'monitor'

Or use a eternal USB-serial converter connected to any of the teensy hardware serial ports,
that will not loose the connection at teensy 'restarts'/repluggin
 
I'll likely drift more into actual Visual Studio stuff, I already kinda use it for Unity3D game stuff, but haven't dug too deep into it.

There are a lot of similarities with VSCode. I like the extension system in VSCode.
And both have features like intellisense and the vertical lines that connect the curly brackets, great to help keep track of things.
That's mainly why I moved away from Arduino IDE, I got my brackets all mixed up, it doesn't that extra visual cue that helps organize.
I also prefer dark mode UI.

It's all slow learning for me. I don't seem to get this stuff as fast as I used to 25 years ago.
 
Do any of you have a suggestion for an alternative serial monitor?
I find the one in VSC/PIO to be very erratic and it barely works most times.

I use MobaXterm due to some weird company policies, but if you're free to choose there are numerous terminal programs around. If you want a dead simple to use free one, look for Compuphase Termite (not sure if links to 3rd parties are allowed here?), I often use it when I just need to see data from any serial port real quick.
 
I use MobaXterm due to some weird company policies, but if you're free to choose there are numerous terminal programs around. If you want a dead simple to use free one, look for Compuphase Termite (not sure if links to 3rd parties are allowed here?), I often use it when I just need to see data from any serial port real quick.

Not seen that linking to relevant tools or hardware is a problem.

@rbfowler9 - is this the program indicated?: compuphase.com/software_termite.htm
 
Using the split window command in Code I can run the serial monitor next to the build output very conveniently. The above looks very unwieldy, but using bash command history I can get this started by typing <Cntrl-R>teensy<enter> at the bash command line. Works great for me
Do you still have to manually push the button on the Teensy to enter program mode if you have the monitor open like this? I still get the following in VSC / platformIO when doing a "build and run" with teensy_serialmon open:

Uploading .pio\build\trigger_teensy41_816\trigger_1.28.hex
Unable to open COM3 for reboot request
Windows Error Info: Access is denied
 
If you use teensy_serialmon (see post #7 above), then the monitor automatically disconnects to allow reprogramming, then restarts. It works extremely reliably -- it should since Paul wrote it!

Perhaps it is a windows thing. It has never failed using Linux
 
On the Mac, I used to have to press the button for each upload. Somewhere along the way, a few releases ago, the behaviour changed such that it was more like the Arduino IDE, where I didn’t have to press the button to program. Well, it was either a Teensyduino release or an OS upgrade.
 
Back
Top