1
0
Форкнуть 0
vscode-python-devicesimulator/docs/how-to-use.md

94 строки
4.7 KiB
Markdown
Исходник Постоянная ссылка Обычный вид История

# How to use the Extension
Commands are accessible through :
- **The command palette** (`Ctrl+Shift+P` or `View->Command Palette`) and type 'Device Simulator Express : `command_name`'
- **The extension buttons** available on the top right of the Text Editor Panel when you have a Python file open (1)
## Available commands
- **Open Simulator** : opens the webview of the simulator.
- **New File** : opens an unsaved file to help you and a code snippet that you can save and play around with.
_(**Note :** will open the simulator webview if it's not open yet)_.
- **Run Simulator** : runs the code you have opened in the simulator (make sure you've clicked on a valid code file).
_(**Note :** will open the simulator webview if it's not open yet)_.
- **Deploy to Device** : saves the code to the connected device.
_(**Note :** For the Circuit Playground Express, 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)_.
Updating ReadMe.md (#145) * changing doc * added app insight to doc * adding configuration section * fixed sound svg issue * adding config doc * removing unused line * updating important files * corrections * Update docs/developers-setup.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/developers-setup.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/developers-setup.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * updated according to review * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * correcting typo * put css back * adding .po file * renamed adafruit class * adding documentation * Adding licence and link to give feedback in readme and correcting installation instructions * adding elemnt * added quick links * updating troubleshooting * updated to original content * removed locale * Update README.md Co-Authored-By: markAtMicrosoft <34253371+markAtMicrosoft@users.noreply.github.com> * Update README.md Co-Authored-By: markAtMicrosoft <34253371+markAtMicrosoft@users.noreply.github.com> * updating read me * Update README.md Co-Authored-By: markAtMicrosoft <34253371+markAtMicrosoft@users.noreply.github.com> * adding infor on dependencies * updating doc * updated according to reviews * adding images * added image * images on same line * changed to resized images * using smaller gifs * updatind due to review * added precision * correcting grammar issues * solving grammar * merged with dev * merged with dev
2019-08-24 01:05:32 +03:00
* **Select Serial Port** : selects the serial port of the board you want the serial monitor to interact with. (2)
_(**Note :** USB detection must be enabled in the extension settings.)_
Updating ReadMe.md (#145) * changing doc * added app insight to doc * adding configuration section * fixed sound svg issue * adding config doc * removing unused line * updating important files * corrections * Update docs/developers-setup.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/developers-setup.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/developers-setup.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * updated according to review * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * correcting typo * put css back * adding .po file * renamed adafruit class * adding documentation * Adding licence and link to give feedback in readme and correcting installation instructions * adding elemnt * added quick links * updating troubleshooting * updated to original content * removed locale * Update README.md Co-Authored-By: markAtMicrosoft <34253371+markAtMicrosoft@users.noreply.github.com> * Update README.md Co-Authored-By: markAtMicrosoft <34253371+markAtMicrosoft@users.noreply.github.com> * updating read me * Update README.md Co-Authored-By: markAtMicrosoft <34253371+markAtMicrosoft@users.noreply.github.com> * adding infor on dependencies * updating doc * updated according to reviews * adding images * added image * images on same line * changed to resized images * using smaller gifs * updatind due to review * added precision * correcting grammar issues * solving grammar * merged with dev * merged with dev
2019-08-24 01:05:32 +03:00
* **Open Serial Monitor** : opens the serial monitor. (2)
_(**Note :** A serial port must have been selected already)_.
Updating ReadMe.md (#145) * changing doc * added app insight to doc * adding configuration section * fixed sound svg issue * adding config doc * removing unused line * updating important files * corrections * Update docs/developers-setup.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/developers-setup.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/developers-setup.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * updated according to review * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * correcting typo * put css back * adding .po file * renamed adafruit class * adding documentation * Adding licence and link to give feedback in readme and correcting installation instructions * adding elemnt * added quick links * updating troubleshooting * updated to original content * removed locale * Update README.md Co-Authored-By: markAtMicrosoft <34253371+markAtMicrosoft@users.noreply.github.com> * Update README.md Co-Authored-By: markAtMicrosoft <34253371+markAtMicrosoft@users.noreply.github.com> * updating read me * Update README.md Co-Authored-By: markAtMicrosoft <34253371+markAtMicrosoft@users.noreply.github.com> * adding infor on dependencies * updating doc * updated according to reviews * adding images * added image * images on same line * changed to resized images * using smaller gifs * updatind due to review * added precision * correcting grammar issues * solving grammar * merged with dev * merged with dev
2019-08-24 01:05:32 +03:00
* **Change Baud Rate** : changes the baud rate of the serial monitor. (2)
Updating ReadMe.md (#145) * changing doc * added app insight to doc * adding configuration section * fixed sound svg issue * adding config doc * removing unused line * updating important files * corrections * Update docs/developers-setup.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/developers-setup.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/developers-setup.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * updated according to review * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * correcting typo * put css back * adding .po file * renamed adafruit class * adding documentation * Adding licence and link to give feedback in readme and correcting installation instructions * adding elemnt * added quick links * updating troubleshooting * updated to original content * removed locale * Update README.md Co-Authored-By: markAtMicrosoft <34253371+markAtMicrosoft@users.noreply.github.com> * Update README.md Co-Authored-By: markAtMicrosoft <34253371+markAtMicrosoft@users.noreply.github.com> * updating read me * Update README.md Co-Authored-By: markAtMicrosoft <34253371+markAtMicrosoft@users.noreply.github.com> * adding infor on dependencies * updating doc * updated according to reviews * adding images * added image * images on same line * changed to resized images * using smaller gifs * updatind due to review * added precision * correcting grammar issues * solving grammar * merged with dev * merged with dev
2019-08-24 01:05:32 +03:00
* **Close Serial Montitor** : closes the serial monitor. (2)
## Available features
- We currently support the [Adafruit Circuit Playground Express board](https://www.adafruit.com/product/3333)
- Access to auto-completion and Python error flagging
- Output panel for the simulator
- Deploy to the physical device (if correctly formatted)
- Debugger for the simulator
Updating ReadMe.md (#145) * changing doc * added app insight to doc * adding configuration section * fixed sound svg issue * adding config doc * removing unused line * updating important files * corrections * Update docs/developers-setup.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/developers-setup.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/developers-setup.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * updated according to review * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * correcting typo * put css back * adding .po file * renamed adafruit class * adding documentation * Adding licence and link to give feedback in readme and correcting installation instructions * adding elemnt * added quick links * updating troubleshooting * updated to original content * removed locale * Update README.md Co-Authored-By: markAtMicrosoft <34253371+markAtMicrosoft@users.noreply.github.com> * Update README.md Co-Authored-By: markAtMicrosoft <34253371+markAtMicrosoft@users.noreply.github.com> * updating read me * Update README.md Co-Authored-By: markAtMicrosoft <34253371+markAtMicrosoft@users.noreply.github.com> * adding infor on dependencies * updating doc * updated according to reviews * adding images * added image * images on same line * changed to resized images * using smaller gifs * updatind due to review * added precision * correcting grammar issues * solving grammar * merged with dev * merged with dev
2019-08-24 01:05:32 +03:00
- Serial Monitor (available on Windows and Mac only)
- Device's features :
- NeoPixels
- Buttons (A & B)
- Playing .wav files
- Red LED
- Switch
- Green LED
- Light sensor
- Motion sensors
- Acceleration detection
- Board shake detection
- Temperature sensor
- Touch sensors
## Not supported yet
- Auto-detect/format the device
- Device's features
- Sound sensor
Updating ReadMe.md (#145) * changing doc * added app insight to doc * adding configuration section * fixed sound svg issue * adding config doc * removing unused line * updating important files * corrections * Update docs/developers-setup.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/developers-setup.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/developers-setup.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * updated according to review * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * correcting typo * put css back * adding .po file * renamed adafruit class * adding documentation * Adding licence and link to give feedback in readme and correcting installation instructions * adding elemnt * added quick links * updating troubleshooting * updated to original content * removed locale * Update README.md Co-Authored-By: markAtMicrosoft <34253371+markAtMicrosoft@users.noreply.github.com> * Update README.md Co-Authored-By: markAtMicrosoft <34253371+markAtMicrosoft@users.noreply.github.com> * updating read me * Update README.md Co-Authored-By: markAtMicrosoft <34253371+markAtMicrosoft@users.noreply.github.com> * adding infor on dependencies * updating doc * updated according to reviews * adding images * added image * images on same line * changed to resized images * using smaller gifs * updatind due to review * added precision * correcting grammar issues * solving grammar * merged with dev * merged with dev
2019-08-24 01:05:32 +03:00
- Tones
- Sound detection (3)
- IR transmitter (3)
- Motion sensors
- Tap detection
2019-08-23 08:22:46 +03:00
## Device Simulator Express configuration
2019-08-23 08:22:46 +03:00
Here are the settings you can change in the Device Simulator Express configuration:
- **Debugger Server Port:** allows you to change the port used to communicate with the debugger. Default value is _5577_. (4)
Updating ReadMe.md (#145) * changing doc * added app insight to doc * adding configuration section * fixed sound svg issue * adding config doc * removing unused line * updating important files * corrections * Update docs/developers-setup.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/developers-setup.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/developers-setup.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * updated according to review * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * Update docs/how-to-use.md Co-Authored-By: Jonathan Wang <jonathanwangg@gmail.com> * correcting typo * put css back * adding .po file * renamed adafruit class * adding documentation * Adding licence and link to give feedback in readme and correcting installation instructions * adding elemnt * added quick links * updating troubleshooting * updated to original content * removed locale * Update README.md Co-Authored-By: markAtMicrosoft <34253371+markAtMicrosoft@users.noreply.github.com> * Update README.md Co-Authored-By: markAtMicrosoft <34253371+markAtMicrosoft@users.noreply.github.com> * updating read me * Update README.md Co-Authored-By: markAtMicrosoft <34253371+markAtMicrosoft@users.noreply.github.com> * adding infor on dependencies * updating doc * updated according to reviews * adding images * added image * images on same line * changed to resized images * using smaller gifs * updatind due to review * added precision * correcting grammar issues * solving grammar * merged with dev * merged with dev
2019-08-24 01:05:32 +03:00
- **Enable USB Detection:** when disabled, prevents the serial monitor from listening to messages from the serial port.
- **Show Device Icon In Editor Title Menu:** allows you to choose whether the _`Deploy to Device`_ button should be in the editor title.
- **Show Open Icon In Editor Title Menu:** allows you to choose whether the _`Open Simulator`_ button should be in the editor title.
- **Show Simulator Icon In Editor Title Menu:** allows you to choose whether the _`Run Simulator`_ button should be in the editor title.
- **Show Dependency Install:** allows you to choose whether you want to be prompted to install the Python dependencies.
## Troubleshooting Tips
- The first time you install the extension, you'll need to execute the `run` command at least once in order to access auto-completion.
- While running a code file, if you get an error saying it can't find the file, make sure you've clicked on a valid Python code file before running it.
- To open the output panel again after closing it go to VS Code menu : `View->Output`.
- For the Circuit Playground Express, 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`.
2019-08-23 08:22:46 +03:00
- If you can't get the Simulator communication working while debugging, try to open you `Settings` and check the port used under `'Device Simulator Express: Debugger Server Port'`. You can either change it (usually ports above 5000 could work) or try to free it, then start debugging again.
### Notes
(1) Can be changed in settings.
(2) To use the Serial Monitor commands, you'll need to open a folder because this saves the configuration file for the serial communication. You can still use the rest of the extension without opening a folder.
(3) Sensors currently not supported by the official adafruit_circuit_playground.express library (v2.1.2).
2019-08-23 08:22:46 +03:00
(4) The regular communication is using the stdout and stdin of the Python process. But when you debug your code, it will communicate over sockets on port 5577. This is the default port that you can change in your `Settings` : `'Device Simulator Express: Debugger Server Port'`.