You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 1, 2024. It is now read-only.
Welcome to Visual Studio Code extension for **Arduino** <sup>preview</sup> ! 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:
6
+
Welcome to the Visual Studio Code extension for **Arduino** <sup>preview</sup> ! The Arduino extension makes it easy to develop, build, deploy and debug your Arduino sketches in Visual Studio Code, with a rich set of functionalities. These include:
7
7
8
8
* IntelliSense and syntax highlighting for Arduino sketches
9
9
* Verify and upload your sketches in Visual Studio Code
@@ -16,10 +16,10 @@ Welcome to Visual Studio Code extension for **Arduino** <sup>preview</sup> ! The
16
16
* Integrated Arduino Debugging <sup>New</sup>
17
17
18
18
## Prerequisites
19
-
Arduino IDE is required. Please install it from [here](https://www.arduino.cc/en/main/software#download).
20
-
-*Note:* Arduino IDE `1.8.7` has some breaking changes, as it will install board package and library fails. It is recommended that you install version `1.8.6`
21
-
- The supported Arduino IDE versions are `1.6.x` and later.
22
-
- The Windows Store's version of Arduino IDE is not supported because of the sandbox environment of Windows app.
19
+
The Arduino IDE is required. Please install it from the [download page](https://www.arduino.cc/en/main/software#download).
20
+
-*Note:* Arduino IDE `1.8.7` has some breaking changes, causing board package and library installation failures. It is recommended to that you install version `1.8.6`
21
+
- The supported Arduino IDE versions are `1.6.x` and later are supported.
22
+
- The Windows Store's version of the Arduino IDE is not supported because of the sandbox environment that the application runs in.
23
23
24
24
## Installation
25
25
Open VS Code and press <kbd>F1</kbd> or <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> to open command palette, select **Install Extension** and type `vscode-arduino`.
@@ -28,30 +28,31 @@ Or launch VS Code Quick Open (<kbd>Ctrl</kbd> + <kbd>P</kbd>), paste the followi
28
28
```bash
29
29
ext install vscode-arduino
30
30
```
31
-
You can also install directly from Marketplace within Visual Studio Code, searching `Arduino`.
31
+
32
+
You can also install directly from the Marketplace within Visual Studio Code, searching for `Arduino`.
32
33
33
34
## Get Started
34
-
You can find code samples and tutorials each time you connect a supported device. Alternatively you can visit our [IoT Developer Blog Space](https://aka.ms/iotdevblog) or [Get Started Tutorials](https://docs.microsoft.com/azure/iot-hub/iot-hub-arduino-iot-devkit-az3166-get-started).
35
+
You can find code samples and tutorials each time that you connect a supported device. Alternatively you can visit our [IoT Developer Blog Space](https://aka.ms/iotdevblog) or [Get Started Tutorials](https://docs.microsoft.com/azure/iot-hub/iot-hub-arduino-iot-devkit-az3166-get-started).
35
36
36
37
## Commands
37
38
This extension provides several commands in the Command Palette (<kbd>F1</kbd> or <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd>) for working with `*.ino` files:
38
39
39
-
-**Arduino: Board Manager**: Manage packages for boards. You can add 3rd party Arduino board by configuring `Additional Board Manager URLs` in board manager.
40
-
-**Arduino: Change Baud Rate**: Change the baud rate of selected serial port.
40
+
-**Arduino: Board Manager**: Manage packages for boards. You can add 3rd party Arduino board by configuring `Additional Board Manager URLs` in the board manager.
41
+
-**Arduino: Change Baud Rate**: Change the baud rate of the selected serial port.
41
42
-**Arduino: Change Board Type**: Change board type or platform.
42
-
-**Arduino: Close Serial Monitor**: Stop serial monitor and release the serial port.
43
-
-**Arduino: Examples**: Show example list.
43
+
-**Arduino: Close Serial Monitor**: Stop the serial monitor and release the serial port.
44
+
-**Arduino: Examples**: Show list of examples.
44
45
-**Arduino: Initialize**: Scaffold a VS Code project with an Arduino sketch.
45
46
-**Arduino: Library Manager**: Explore and manage libraries.
46
-
-**Arduino: Open Serial Monitor**: Open serial monitor in the intergrated output window.
47
+
-**Arduino: Open Serial Monitor**: Open the serial monitor in the integrated output window.
47
48
-**Arduino: Select Serial Port**: Change the current serial port.
48
49
-**Arduino: Send Text to Serial Port**: Send a line of text via the current serial port.
49
50
-**Arduino: Upload**: Build sketch and upload to Arduino board.
50
51
-**Arduino: Upload Using Programmer**: Upload using an external programmer.
51
52
-**Arduino: Verify**: Build sketch.
52
53
53
54
## Options
54
-
The following Visual Studio Code settings are available for the Arduino extension. These can be set in global user preferences <kbd>Ctrl</kbd> + <kbd>,</kbd> or workspace settings (`.vscode/settings.json`). The later overrides the former.
55
+
The following Visual Studio Code settings are available for the Arduino extension. These can be set in global user preferences <kbd>Ctrl</kbd> + <kbd>,</kbd> or workspace settings (`.vscode/settings.json`). The latter overrides the former.
55
56
56
57
```json
57
58
{
@@ -69,20 +70,20 @@ The following Visual Studio Code settings are available for the Arduino extensio
69
70
}
70
71
```
71
72
-`arduino.path` - Path to Arduino, you can use a custom version of Arduino by modifying this setting to include the full path. Example: `C:\\Program Files\\Arduino` for Windows, `/Applications` for Mac, `/home/<username>/Downloads/arduino-1.8.1` for Linux. (Requires a restart after change). The default value is automatically detected from your Arduino IDE installation path.
72
-
-`arduino.commandPath` - Path to an executable (or script) relative to `arduino.path`. The default value is `arduino_debug.exe`for windows and `arduino`for ubuntu. You also can use a custom launch script to run Arduino by modifying this setting. (Requires a restart after change) Example: `run-arduino.bat` for Windows, `Contents/MacOS/run-arduino.sh` for Mac,`bin/run-arduino.sh` for Linux.
73
-
-`arduino.additionalUrls` - Additional Boards Manager URLs for 3rd party packages. You can have multiple URLs in one string with comma(`,`) as separator, or have a string array. The default value is empty.
73
+
-`arduino.commandPath` - Path to an executable (or script) relative to `arduino.path`. The default value is `arduino_debug.exe`for windows and `arduino`for ubuntu. You also can use a custom launch script to run Arduino by modifying this setting. (Requires a restart after change) Example: `run-arduino.bat` for Windows, `Contents/MacOS/run-arduino.sh` for Mac and`bin/run-arduino.sh` for Linux.
74
+
-`arduino.additionalUrls` - Additional Boards Manager URLs for 3rd party packages. You can have multiple URLs in one string with a comma(`,`) as separator, or have a string array. The default value is empty.
74
75
-`arduino.logLevel` - CLI output log level. Could be info or verbose. The default value is `"info"`.
75
76
-`arduino.enableUSBDetection` - Enable/disable USB detection from the VSCode Arduino extension. The default value is `true`. When your device is plugged in to your computer, it will pop up a message "`Detected board ****, Would you like to switch to this board type`". After clicking the `Yes` button, it will automatically detect which serial port (COM) is connected a USB device. If your device does not support this feature, please provide us with the PID/VID of your device; the code format is defined in `misc/usbmapping.json`.
76
-
> To learn more about how to list the vid/pid, use this tools https://github.com/EmergingTechnologyAdvisors/node-serialport
77
+
> To learn more about how to list the vid/pid, use the following tools:https://github.com/EmergingTechnologyAdvisors/node-serialport
77
78
78
79
```bash
79
80
npm install -g serialport
80
81
serialport-list -f jsonline
81
82
```
82
83
83
-
-`arduino.disableTestingOpen` - Enable/disable automatically sending a test message to serial port for checking open status. The default value is `false` (a test message will be sent).
84
-
-`arduino.skipHeaderProvider` - Enable/disable the extension providing completion items for headers. The functionality is included in newer versions of the C++ extension. The default value is `false`.
85
-
-`arduino.defaultBaudRate` - Default baud rate for serial port monitor. The default value is 115200. Supported values are 300, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 74880, 115200, 230400 and 250000.
84
+
-`arduino.disableTestingOpen` - Enable/disable automatic sending of a test message to the serial port for checking the open status. The default value is `false` (a test message will be sent).
85
+
-`arduino.skipHeaderProvider` - Enable/disable the extension providing completion items for headers. This functionality is included in newer versions of the C++ extension. The default value is `false`.
86
+
-`arduino.defaultBaudRate` - Default baud rate for the serial port monitor. The default value is 115200. Supported values are 300, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 74880, 115200, 230400 and 250000.
86
87
87
88
The following settings are as per sketch settings of the Arduino extension. You can find them in
88
89
`.vscode/arduino.json` under the workspace.
@@ -99,46 +100,46 @@ The following settings are as per sketch settings of the Arduino extension. You
99
100
```
100
101
-`sketch` - The main sketch file name of Arduino.
101
102
-`port` - Name of the serial port connected to the device. Can be set by the `Arduino: Select Serial Port` command.
102
-
-`board` - Current selected Arduino board alias. Can be set by the `Arduino: Change Board Type` command. Also, you can find the board list there.
103
-
-`output` - Arduino build output path. If not set, Arduino will create a new temporary output folder each time, which means it cannot reuse the intermediate result of the previous build leading to long verify/upload time, so it is recommended to set the field. Arduino requires that the output path should not be the workspace itself or subfolder of the workspace, otherwise, it may not work correctly. By default, this option is not set.
104
-
-`debugger` - The short name of the debugger that will be used when the board itself does not have any debugger and there are more than one debugger available. You can find the list of debuggers [here](https://github.com/Microsoft/vscode-arduino/blob/master/misc/debuggerUsbMapping.json). By default, this option is not set.
105
-
-`prebuild` - External command before build sketch file. You should only set one prebuild command. `command1 && command2`doesn't work. If you need to run multiple commands before build, write them into a script.
103
+
-`board` - Currently selected Arduino board alias. Can be set by the `Arduino: Change Board Type` command. Also, you can find the board list there.
104
+
-`output` - Arduino build output path. If not set, Arduino will create a new temporary output folder each time, which means it cannot reuse the intermediate result of the previous build leading to long verify/upload time, so it is recommended to set the field. Arduino requires that the output path should not be the workspace itself or in a subfolder of the workspace, otherwise, it may not work correctly. By default, this option is not set.
105
+
-`debugger` - The short name of the debugger that will be used when the board itself does not have a debugger and there is more than one debugger available. You can find the list of debuggers [here](https://github.com/Microsoft/vscode-arduino/blob/master/misc/debuggerUsbMapping.json). By default, this option is not set.
106
+
-`prebuild` - External command before building the sketch file. You should only set one `prebuild` command. `command1 && command2`does not work. If you need to run multiple commands before the build, then create a script.
106
107
107
108
## Debugging Arduino Code <sup>preview</sup>
108
-
Before you start debugging your Arduino code, read [this doc](https://code.visualstudio.com/docs/editor/debugging)and get to know the basic mechanism about debugging in Visual Studio Code. Also, see [debugging for C++ in VSCode](https://code.visualstudio.com/docs/languages/cpp#_debugging) for your reference.
109
+
Before you start to debug your Arduino code, please read [this document](https://code.visualstudio.com/docs/editor/debugging) to learn about the basic mechanisms of debugging in Visual Studio Code. Also see [debugging for C++ in VSCode](https://code.visualstudio.com/docs/languages/cpp#_debugging) for further reference.
109
110
110
-
Make sure your Arduino board can work with [STLink](http://www.st.com/en/development-tools/st-link-v2.html), [Jlink](https://www.segger.com/jlink-debug-probes.html) or [EDBG](http://www.atmel.com/webdoc/protocoldocs/ch01s01.html). The debugging support currently is fully tested with the following boards.
111
+
Make sure that your Arduino board can work with [STLink](http://www.st.com/en/development-tools/st-link-v2.html), [Jlink](https://www.segger.com/jlink-debug-probes.html) or [EDBG](http://www.atmel.com/webdoc/protocoldocs/ch01s01.html). The debugging support is currently fully tested with the following boards:
1. Plug in your board to your development machine properly. For those boards which don't have an on-board debugging chip, you need to use a STLink or JLink connector.
119
-
2. Go to **Debug View** (<kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>D</kbd>). Set breakpoints in your source files.
119
+
1. Plug in your board to your development machine properly. For those boards that do not have an on-board debugging chip, you need to use a STLink or JLink connector.
120
+
2. Go to the **Debug View** (<kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>D</kbd>). and set breakpoints in your source files.
120
121
3. Press <kbd>F5</kbd> to select your debugging environment.
121
122
4. When your breakpoint is hit, you can see variables and add expression(s) to watch on the Debug Side Bar.
122
123
123
124
> To learn more about how to debug Arduino code, visit our [team blog](https://blogs.msdn.microsoft.com/iotdev/2017/05/27/debug-your-arduino-code-with-visual-studio-code/).
124
125
125
126
## Change Log
126
-
See the [Change log](https://github.com/Microsoft/vscode-arduino/blob/master/CHANGELOG.md) for the details of changes for each version.
127
+
See the [Change log](https://github.com/Microsoft/vscode-arduino/blob/master/CHANGELOG.md) for details about the changes in each version.
127
128
128
129
## Supported Operating Systems
129
130
Currently this extension supports the following operating systems:
130
131
131
132
- Windows 7 and later (32-bit and 64-bit)
132
133
- macOS 10.10 and later
133
134
- Ubuntu 16.04
134
-
- The extension might work on other Linux distros, as reported by some users but that is without guarantee.
135
+
- The extension might work on other Linux distributions, as reported by other users, but without guarantee.
135
136
136
137
## Support
137
-
You can find the full list of issues at[Issue Tracker](https://github.com/Microsoft/vscode-arduino/issues). You can submit a [bug or feature suggestion](https://github.com/Microsoft/vscode-arduino/issues/new), and participate in community driven [discussions](https://gitter.im/Microsoft/vscode-arduino).
138
+
You can find the full list of issues on the[Issue Tracker](https://github.com/Microsoft/vscode-arduino/issues). You can submit a [bug or feature suggestion](https://github.com/Microsoft/vscode-arduino/issues/new), and participate in community driven [discussions](https://gitter.im/Microsoft/vscode-arduino).
138
139
139
140
## Development
140
141
141
-
Installing Prerequisites:
142
+
Installation prerequisites:
142
143
143
144
-[Git](https://git-scm.com/)
144
145
-[Node.js](https://nodejs.org/) (>= 6.5.0)
@@ -152,16 +153,16 @@ To *run and develop*, do the following:
152
153
- Open in Visual Studio Code (`code .`)
153
154
- Press <kbd>F5</kbd> to debug.
154
155
155
-
*To test do the following:* <kbd>F5</kbd> in VS Code with the "Launch Tests" debug configuration.
156
+
To *test*, press <kbd>F5</kbd> in VS Code with the "Launch Tests" debug configuration.
156
157
157
158
## Code of Conduct
158
159
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct). For more information please see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/#howadopt) or contact [email protected] with any additional questions or comments.
159
160
160
161
## Privacy Statement
161
-
The [Microsft Enterprise and Developer Privacy Statement](https://www.microsoft.com/en-us/privacystatement/EnterpriseDev/default.aspx) describes the privacy statement of this software.
162
+
The [Microsoft Enterprise and Developer Privacy Statement](https://www.microsoft.com/en-us/privacystatement/EnterpriseDev/default.aspx) describes the privacy statement of this software.
162
163
163
164
## License
164
-
This extension is licensed under [MIT License](https://github.com/Microsoft/vscode-arduino/blob/master/LICENSE.txt). Please see the [Third Party Notice](https://github.com/Microsoft/vscode-arduino/blob/master/ThirdPartyNotices.txt) file for additional copyright notices and terms.
165
+
This extension is licensed under the [MIT License](https://github.com/Microsoft/vscode-arduino/blob/master/LICENSE.txt). Please see the [Third Party Notice](https://github.com/Microsoft/vscode-arduino/blob/master/ThirdPartyNotices.txt) file for additional copyright notices and terms.
165
166
166
167
## Contact Us
167
168
If you would like to help build the best Arduino experience with VS Code, you can reach us directly at [gitter chat room](https://gitter.im/Microsoft/vscode-arduino).
0 commit comments