I am currently programming a Teens y2.0 using the Arduino IDE with Teensyduino. It works but Arduino IDE is rubbish, so I would like to use VS Code. However while the Arduino VS code plugin works fine, it doesn't recognise the Teensy as a board, even though Teensyduino installs its libraries etc into the Arduino IDE package.
Does anyone know how to add Teensy support to VS Code or an alternative IDE I can use that will recognise the board?
OSX Sierra / VS Code with vscode-arduino plugin v0.24 / Teensy 2.0
Most programs written for Arduino work on Teensy. All of the standard Arduino functions (digitalWrite, pinMode, analogRead, etc) all work on Teensy. Teensyduino is also compatible with many Arduino libraries. Teensy is not limited to only serial device type.
Open VS Code, then open your Arduino library folder by navigating to File > Open Folder.... (or tap CTRL+K then CTRL+O.) Then select the Arduino library folder you'd like to open in the IDE.
Most projects use Arduino with Teensyduino extensions, or C language to program Teensy. However, a number of other options are available.
Installing Arduino ExtensionLaunch VS Code and from the Extensions menu ( Ctrl + Shift + X ) search for “Arduino”. Install the Arduino extension. After installing, reload the IDE. You need to have either Arduino IDE and Arduino CLI already installed in your system in order for the Arduino extension to VS Code to work.
You can use PlatformIO with Visual Studio Code (or with many other major IDEs, or even from the command line). PlatformIO is a build system (sort of like Make, but with a lot more power) for all kinds of embedded platforms.
To get started:
To see it working:
You will still need Teensyduino!
[Hat tip to Mikah Barnett for the answer in the comments]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With