Visual Studio Code Your Arduino

Sign in to queue

Description

So you have an Arduino that you love playing with. You also have one of your favorite code editors, VS Code. Every time you start coding with one or the other, you wish you could use both together.

Now you can! (And feel great about it since the extension is open source!)

Visual Studio Code Extension for Arduino is now open sourced!

We are glad to share the news that the Visual Studio Code Extension for Arduino has been open sourced on GitHub.com at https://github.com/Microsoft/vscode-arduino! This is a great team effort to provide a good development experience for Arduino developers.

image

...

Our Arduino extension fully embraces the Arduino developer community and is almost fully compatible and consistent with the official Arduino IDE. On top of it, we added the most sought-after features, such as IntelliSense, Auto code completion, and on-device debugging for supported boards.

Here is a list of the core functionalities:

  • IntelliSense and syntax highlighting for Arduino sketches
  • Verify and upload your sketches in Visual Studio Code
  • Built-in board and library manager
  • Built-in example list
  • Built-in serial monitor
  • Snippets for sketches
  • Automatic Arduino project scaffolding
  • Command Palette (F1) integration of frequently used commands (e.g. Verify, Upload…)
  • Integrated Arduino Debugging New

For Arduino extension users, you can directly download and install the extension from Visual Studio Code Marketplace at: https://aka.ms/arduino.

...

it a better tool!

The project is open sourced on GitHub under MIT License, and you can participate in different ways:

  • File a bug, submit a feature request, you can find the current bug/issue list and feature requests at GitHub’s issue tracker.
  • Join developers and users’ discussions at chat on gitter.
  • Fork the repository, fix bugs and send pull requests
  • Fork the repository, add your new cool features and send pull requests.

There are detailed instructions on how to get started for developing with the source code at our GitHub repo.

... [Click through to read it all]

What can you do with this? How about Azure IoT!

Azure IoT DevKit Preview built with Arduino and VSCode

There have been a number of Azure IoT Starter Kits available for some time now. I’ve written about the Starter Kits in the past. Some of these like the Raspberry Pi Azure IoT Starter Kit from Adafruit require you to wire up sensors and things, while the GrovePi+ is similar to a Lego Mindstorm but for prototyping Internet of Things devices. It seems that Microsoft is finally consolidating onto a specific “Azure IoT Developer Kit”, and they’ve already made early previews available upon application. This new Azure IoT “DevKit” is a single board packed with sensors, buttons, OLED screen, and more! Plus, it’s Arduino compatible!

Build 2017 Debut

At the Build 2017 conference Microsoft debuted an initial preview version of the MXChip IoT Developer Kit. This kit is an Arduino compatible board with a rich set of integrated features (sensors, buttons, OLED display, and more) that supports programming using Visual Studio Code for development. This DevKit is built with the goal in mind of lowering the barrier for developers to get started creating IoT solutions on Microsoft Azure.

The primary goals of the Azure IoT Development Kit is to ease the pain of developers to get started prototyping IoT solutions. Some of the difficulties they are attempting to solve with this platform are as follows:

... [Click through for the rest]

Where do you get it?

Visual Studio Code extension for Arduino

Welcome to Visual Studio Code extension for Arduino preview ! The Arduino extension makes it easy to code, build, deploy and debug your Arduino sketches in Visual Studio Code, with a rich set of functionalities:

  • IntelliSense and syntax highlighting for Arduino sketches
  • Verify and upload your sketches in Visual Studio Code
  • Built-in board and library manager
  • Built-in example list
  • Built-in serial monitor
  • Snippets for sketches
  • Automatic Arduino project scaffolding
  • Command Palette (F1) integration of frequently used commands (e.g. Verify, Upload...)
  • Integrated Arduino Debugging New

Prerequisites

Arduino IDE is required. Please install it from here.

  • The supported Arduino IDE versions are 1.6.x and later.
  • The Windows Store's version of Arduino IDE is not supported because of the sandbox environment of Windows app.

Installation

...

Get Started

You can find code samples and tutorials each time you connect a supported device.
Alternatively you can visit our IoT Developer Blog Space or Get Started Tutorials

...

Commands

This extension provides several commands in the Command Palette (F1 or Ctrl+Shift+P) for working with *.ino files:

...

Options

The following Visual Studio Code settings are available for the Arduino extension. These can user preferences Ctrl + , or workspace settings (.vscode/settings.json). The later overrides the former.

...

Debugging Arduino Code preview

Before you start debug your Arduino code, read this doc and get to know the basic mechanism about debugging in Visual Studio Code. Also see debugging for C++ in VSCode for your reference.

... [Click through, there's much more to read]



The Discussion

Add Your 2 Cents