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 Dec 23, 2021. It is now read-only.
Updated code owners, fixed some spelling errors and improved sections of README (#168)
* Fixed some spelling errors and improved sections of README and other docs
* Updated quotation marks to be consistent
* Updated developers section to be more understandable
* Updated code owners to include Garage coaches
@@ -29,7 +29,7 @@ monitor allows you to observe the device output.
29
29
- Temperature sensor
30
30
- 7 Capacitive Touch sensors
31
31
32
-
The simulator supports most of the sensors on CPX except **IR transmitter & Receiver**, **Sound Sensor (microphone)**, **Speaker (Play Tone)** and the **“tap” on Motion Sensor**.
32
+
The simulator supports most of the sensors on CPX except **IR transmitter & Receiver**, **Sound Sensor (microphone)**, **Speaker (Play Tone)** and the **"tap" on Motion Sensor**.
33
33
The code related to these sensors can still run on the actual CPX board and be deployed using Device Simulator Express.
34
34
As we only support CPX library now, other libraries (i.e. simpleio) can’t run on the simulator. But they will work on the actual device!
35
35
@@ -58,38 +58,38 @@ The following dependecies can be installed for you by the extension by clicking
58
58
install by typing the following commands in a console: `pip install applicationinsights`
2. Name and save your file somewhere, and we’re good to go! (3)
81
+
3. Start with some examples: you can find examples files and tutorials inside the comments, as well as in the notification pop up when you run the `"Device Simulator Express: New File"` Command.
82
82
83
-

83
+
<img alt='How to find example code screenshot' src=https://raw.githubusercontent.com/microsoft/vscode-python-devicesimulator/dev/assets/readmeFiles/findExamples.jpg>
84
84
85
85
### 2. Start from an existing python file.
86
86
87
87
1. Open the folder or your .py file in Visual Studio Code.
88
88
2. Run `open Simulator` from the command palette or icon in the editor toolbar.
89
89
90
-
### 3. Run your code on the simulator.
90
+
### 3. Run your code on the simulator.
91
91
92
-

92
+
<imgalt='How to run the simulator animation'src='https://github.com/microsoft/vscode-python-devicesimulator/blob/dev/assets/readmeFiles/run.gif?raw=true'>
93
93
94
94
- Run `Run Simulator` from the command palette or icon in the editor toolbar.
95
95
- You can use the `Play` or `Refresh` button on the simulator webview.
@@ -100,14 +100,14 @@ Before deploying the python code to your CPX device, you need to format your dev
100
100
101
101
1. Download the firmware with the .uf2 file (link: https://learn.adafruit.com/adafruit-circuit-playground-express/circuitpython-quickstart)
102
102
2. Download the lastest version of the cpx library (link: https://learn.adafruit.com/welcome-to-circuitpython/circuitpython-libraries).
103
-
**_Note:_** Make sure you name your file main.py or code.py: the device automatically runs the first file that is likely named.
103
+
**_Note:_** Make sure you name your file `main.py` or `code.py`: the device automatically runs the first file that is likely named. This is the convention for CircuitPython ([source](https://learn.adafruit.com/welcome-to-circuitpython/creating-and-editing-code#naming-your-program-file-7-32)).
104
104
105
-

105
+
<img alt="Deploy to Device" src=https://raw.githubusercontent.com/microsoft/vscode-python-devicesimulator/dev/assets/readmeFiles/deployToBoard.png>
106
106
107
-
### 5. Use the Serial Monitor for your Adafruit CPX device(available Windows and Mac only)
107
+
### 5. Use the Serial Monitor for your Adafruit CPX device(available on Windows and Mac only)
108
108
109
109
1. Plug in your CPX device (make sure it’s formatted properly already)
110
-
2. Run the command `Device Simulator Express: Open Serial Monitor`
110
+
2. Run the command `"Device Simulator Express: Open Serial Monitor"`
111
111
3. Select your baud rate for the serial port
112
112
4. The print() statements in your code will show in the output console
113
113
@@ -129,7 +129,7 @@ or by using the toolbar.
129
129
130
130
Device Simulator Express provides several commands in the Command Palette (F1 or Ctrl + Shift + P/ Cmd + Shift + P for Mac OS) for working with \*.py files:
131
131
132
-
-`Device Simulator Express: New File`: Opens an unsaved .py file with template code, also open the simulator.
132
+
-`Device Simulator Express: New File`: Opens an unsaved .py file with template code, also opens the simulator.
133
133
-`Device Simulator Express: Open Simulator`: Opens the simulator in the webView
134
134
-`Device Simulator Express: Run on Simulator`: Runs python code on the simulator
135
135
-`Device Simulator Express: Deploy to Device`: Copies & Pastes the code.py or main.py file to CIRCUITPY drive if detected a CPX is plugged in
@@ -186,7 +186,7 @@ A `ThirdPartyNotices.txt` file is provided in the extension's source code listin
186
186
- To open the output panel again after closing it go to VS Code menu: `View->Output`.
187
187
- If you have pylint enabled, it might underline the import of the adafruit_circuitplayground library, but it will work correctly.
188
188
- If you try to deploy to the device while it's plugged in but you still get an error saying it cannot find the board, make sure your Circuit Playground Express is formatted correctly and that its name matches `CIRCUITPY`.
189
-
- If you can't get the Simulator communication working while debugging, try to open your `Settings` and check the port used under `'Device Simulator Express: Debugger Server Port'`. You can either change it (usually ports above 5000 should work) or try to free it, then start debugging again.
189
+
- If you can't get the Simulator communication working while debugging, try to open your `Settings` and check the port used under `"Device Simulator Express: Debugger Server Port"`. You can either change it (usually ports above 5000 should work) or try to free it, then start debugging again.
190
190
- When you are using the serial monitor, if you get some unusual error messages, unplug the device and reload the VS Code windows.
191
191
192
192
## License
@@ -217,6 +217,6 @@ A `ThirdPartyNotices.txt` file is provided in the extension's source code listin
217
217
218
218
## Notes
219
219
220
-
(1) Note: the easiest way to do it is to select the "Add to PATH" option directly when you install Python. Otherwise you can search how to insert it manually, but make sure that when you type _python_ in a terminal, the command is recognized and have the correct version.
221
-
(2) You can chose to see to see the prompt or not by changing the extension configirations.
222
-
(3) To be able to run the file from your physical device, it should either be named code.py or main.py.
220
+
1. Make sure that when you type _python_ in a terminal, the command is recognized and you have the correct version. The easiest way to do it is to select the "Add to PATH" option directly when you install Python. Otherwise you can search how to insert it manually.
221
+
2. You can choose to see the prompt or not by changing the extension configurations.
222
+
3. To be able to run the file on your physical device, it should either be named code.py or main.py.
Copy file name to clipboardExpand all lines: docs/developers-setup.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@
19
19
-**Note:** On extension activation you will be prompted a popup asking if you want the modules to be automatically installed for you, **except**`pywin32` which is needed only on Windows platform.
20
20
- Playsound
21
21
- Run the command in a console : `pip install playsound`
22
-
-pytest
22
+
-Pytest
23
23
- Run the command in a console : `pip install pytest`
24
24
- Pywin32
25
25
-**Note:** This is only needed for Windows computers. You must install it manually with the above command!
@@ -35,7 +35,7 @@
35
35
36
36
* Python extension for VS Code (download from VS Code market place)
37
37
38
-
## Steps to Get Started Running the Extension in Debug Mode
38
+
## Steps to Get Started Running the Extension Locally
39
39
40
40
1. Make sure you have all the dependencies installed (Node, Python, Playsound, VS Code, Python VS Code extension)
41
41
@@ -47,12 +47,12 @@
47
47
48
48
5. Run the command : `npm run compile`
49
49
50
-
6. Start debugging the extension by pressing F5 or going to VS Code Debug menu and select 'Start debugging'
50
+
6. Start running the extension locally by pressing F5 or going to VS Code Debug menu and select 'Start debugging'
51
51
52
52
## Notes on how to use it
53
53
54
54
-[Documentation to use the Extension](/docs/how-to-use.md)
55
-
- Debugging the extension opens a new VS Code window with the extension installed
55
+
- Debugging the extension opens a new VS Code window with the local build of the extension
56
56
- From the original VS Code window (opened in our repository) you can see outputs in the Debug Console
57
57
- In the new VS Code window, you can access the commands provided by the extension from the Commands Palette (Ctrl+Shift+P)
Copy file name to clipboardExpand all lines: docs/how-to-use.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
Commands are accessible through :
4
4
5
-
-**The command palette** (`Ctrl+shift+P` or `View->Command Palette`) and type 'Device Simulator Express : `command_name`'
5
+
-**The command palette** (`Ctrl+Shift+P` or `View->Command Palette`) and type 'Device Simulator Express : `command_name`'
6
6
-**The extension buttons** available on the top right of the Text Editor Panel when you have a Python file open (1)
7
7
8
8
## Available commands
@@ -12,11 +12,11 @@ Commands are accessible through :
12
12
-**New File** : opens an unsaved file with links to help you and a code snippet that you can save as `code.py` / `main.py`.
13
13
_(**Note :** will open the simulator webview if it's not open yet)_.
14
14
15
-
-**Run Simulator** : run the code you have open on the simulator (make sure you've clicked on a valid code file).
15
+
-**Run Simulator** : runs the code you have opened in the simulator (make sure you've clicked on a valid code file).
16
16
_(**Note :** will open the simulator webview if it's not open yet)_.
17
17
18
18
-**Deploy to Device** : saves the code to a Circuit Playground Express.
19
-
_(**Note :** the board needs to be correctly formatted to a `CIRCUITPY` drive first if it's not the case :[Installing CircuitPython](https://learn.adafruit.com/welcome-to-circuitpython/installing-circuitpython))_.
19
+
_(**Note :** the board needs to be correctly formatted to a `CIRCUITPY` drive first. If that's not the case check[Installing CircuitPython](https://learn.adafruit.com/welcome-to-circuitpython/installing-circuitpython) to correctly format it)_.
20
20
21
21
***Select Serial Port** : selects the serial port of the board you want the serial monitor to interact with. (2)
22
22
_(**Note :** USB detection must be enabled in the extension settings.)_
Copy file name to clipboardExpand all lines: docs/install.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ _Note: You need to install all the dependencies in order to use the extension._
23
23
-[Python VS Code extension](https://marketplace.visualstudio.com/items?itemName=ms-python.python)
24
24
-**Note:** This extension is installed automatically from the marketplace when you install our extension
25
25
- Python Modules
26
-
-**Note:** On extension activation you will be prompted a popup asking if you want the modules to be automatically installed for you, **except**`pywin32` which is needed only on Windows platform.
26
+
-**Note:** On extension activation a popup will be prompted asking if you want the modules to be automatically installed for you, **except**`pywin32` which is needed only on Windows platform.
27
27
- Playsound : `pip install playsound`
28
28
- Pywin32 : `pip install pywin32`
29
29
-**Note:** This is only needed for Windows computers. You must install it manually with the above command!
"info.thirdPartyWebsite": "By clicking \"Agree and Proceed\" you will be redirected to adafruit.com, a third party website not managed by Microsoft. Please note that your activity on adafruit.com is subject to Adafruit's privacy policy",
38
-
"info.welcomeOutputTab": "Welcome to the Adafruit Simulator output tab!\n\n",
38
+
"info.welcomeOutputTab": "Welcome to the Adafruit Simulator output tab!\n\n",
0 commit comments