Skip to content
This repository was archived by the owner on Dec 23, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/developers-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@

- Run the command in a console : `pip install python-socketio`

- Application Insights

- Run the command in a console : `pip install applicationinsights`

- Requests

- Run the command in a console : `pip install requests`
Expand Down Expand Up @@ -70,3 +74,5 @@
- `view` : React side
- `components/`
- `cpx/` and `Simulator.tsx` : contain the React components and objects to display and handle the simulator webview
- `toolbar/` : contains the React components used in the toolbar and the modal.
- `translation/en.json`: contains the constants that should be localized. To internationalize the extension you can add additional files with constants sharing the same id found in _en.json_, but with the translated value.
37 changes: 31 additions & 6 deletions docs/how-to-use.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Commands are accessible through :

- **The command palette** (`Ctrl+shift+P` or `View->Command Palette`) and type 'Pacifica : `command_name`'
- **The extension buttons** available on the top right of the Text Editor Panel when you have a Python file open
- **The extension buttons** available on the top right of the Text Editor Panel when you have a Python file open\*

## Available commands

Expand All @@ -18,13 +18,24 @@ Commands are accessible through :
- **Deploy to Device** : saves the code to a Circuit Playground Express.
_(**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))_.

- **Select Serial Port** : selects the serial port of the board you want the serial monitor to interact with.
_(**Note :** USB detection must be enabled in the extension settings.)_

- **Open Serial Monitor** : opens the serial monitor.
_(**Note :** A serial port must have been selected already)_.

- **Change Baud Rate** : changes the baud rate of the serial monitor.

- **Close Serial Montitor** : closes the serial monitor.

## 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
- Serial Monitor
- Device's features :
- NeoPixels
- Buttons (A & B)
Expand All @@ -42,15 +53,28 @@ Commands are accessible through :
## Not supported yet

- Auto-detect/format the device
- Serial monitor for the device
- Device's features
- Sound sensor
- Tones
- Sound detection\*
- IR transmitter\*
- Sound detection\*\*
- IR transmitter\*\*
- Motion sensors
- Tap detection

## Pacifica configuration

Here are the settings you can change in the Pacifica configuration:

- **Debugger Server Port:** allows you to change the port used to communicate with the debugger. Default value is _5577_.

- **Enable USBDetection:** when disabled, prevents the serial monitor from listening to messages from the serial port.

- **Show Device Icon In Editor Title Menu:** allows you to chose whether the _`Deploy to Device`_ button should be in the editor title.

- **Show Open Icon In Editor Title Menu:** allows you to chose whether the _`Open Simulator`_ button should be in the editor title.

- **Show Simulator Icon In Editor Title Menu:** allows you to chose whether the _`Run Simulator`_ button should be in the editor title.

## 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.
Expand All @@ -62,5 +86,6 @@ Commands are accessible through :

### Note

\* Sensors currently not supported by the official adafruit_circuit_playground Express library (v2.1.2).
\*\* The regular communication is using the stdout and stdin of the Pyhton process. But when you debug your code, it will use a communication over sockets on the port 5577. This is the default port that you can change in your `Settings` : `'Pacifica: Debugger Server Port'`.
\* Can be changed in settings.
\*\* Sensors currently not supported by the official adafruit_circuit_playground.express library (v2.1.2).
\*\*\* 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` : `'Pacifica: Debugger Server Port'`.
4 changes: 3 additions & 1 deletion src/view/styles/Button.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
.button-icon {
fill: var(--vscode-badgeForegroundOverride);
}
.button-rectangle {
stroke: var(--vscode-badgeForegroundOverride);
}

.play-button {
border-radius: 8px 0px 0px 8px;
Expand All @@ -31,7 +34,6 @@
border: none;
}

.toolbar-button:focus,
.toolbar-button:hover {
outline: none;
}
Expand Down
2 changes: 1 addition & 1 deletion src/view/svgs/toolbar_svg.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -355,13 +355,13 @@ export const SOUND_SVG = (
/>
<rect
id="Rectangle-2"
stroke="#FFFFFF"
stroke-width="1.2"
x="3.40000068"
y="1.1"
width="3.8"
height="9.3"
rx="1.9"
className="button-rectangle"
/>
</g>
</g>
Expand Down