Skip to content
This repository was archived by the owner on Dec 23, 2021. It is now read-only.

Commit 003b42b

Browse files
authored
Clue README (#305)
update readme for clue
1 parent 2495de3 commit 003b42b

File tree

4 files changed

+76
-18
lines changed

4 files changed

+76
-18
lines changed

README.md

Lines changed: 76 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ monitor allows you to observe the device output.
1717

1818
[<img alt='bbc micro:bit' src='https://github.com/raw/microsoft/vscode-python-devicesimulator/dev/assets/readmeFiles/microbit/microbit.png'>](#bbc-microbit-simulator)
1919

20-
20+
- [**Adafruit CLUE**](#adafruit-clue-simulator) (hidden behind preview flag)
21+
22+
[<img alt='Adafruit CLUE' src='https://github.com/raw/microsoft/vscode-python-devicesimulator/dev/assets/readmeFiles/clue/clue.png'>](#adafruit-clue-simulator)
2123
## Build Status
2224

2325
| Branch | Build Status |
@@ -78,15 +80,14 @@ As we only support CPX library now, other libraries (i.e. simpleio) can’t run
7880
- [Download Firmware .uf2 file](https://learn.adafruit.com/adafruit-circuit-playground-express/circuitpython-quickstart)
7981
- [Download the latest version of the Adafruit CPX library](https://learn.adafruit.com/welcome-to-circuitpython/circuitpython-libraries)
8082

81-
### Keybindings
82-
83+
### Keyboard Shortcuts
8384
In Device Simulator Express, you can use keyboard to interact with the device:
8485

85-
- Push Button `A for A, B for B, C for A & B`
86-
- Capacitive Touch Sensor `A1 – A7: SHIFT + 1 ~ 7`
87-
- Slider Switch: `SHIFT + S`
88-
- Refresh the simulator: `SHIFT + R`
89-
- Run the simulator: `SHIFT + F`
86+
- Push Button: <kbd>A</kbd> for Button A, <kbd>B</kbd> for Button B, <kbd>C</kbd> for Buttons A & B
87+
- Capacitive Touch Sensor: <kbd>Shift</kbd> + <kbd>1</kbd> ~ <kbd>7</kbd> for GPIO pins A1 - A7
88+
- Slider Switch: <kbd>Shift</kbd> + <kbd>S</kbd>
89+
- Refresh the simulator: <kbd>Shift</kbd> + <kbd>R</kbd>
90+
- Run the simulator: <kbd>Shift</kbd> + <kbd>F</kbd>
9091

9192
## BBC micro:bit Simulator
9293

@@ -98,6 +99,7 @@ In Device Simulator Express, you can use keyboard to interact with the device:
9899
- Serial monitor (available on Windows and Mac only)
99100
- Simulation of the micro:bit device, including:
100101
- 25 LEDs
102+
- Push Buttons A and B
101103
- Light sensor
102104
- Motion sensors
103105
- Acceleration detection including gesture detection
@@ -108,26 +110,82 @@ In Device Simulator Express, you can use keyboard to interact with the device:
108110
- [MicroPython documentation](https://microbit-micropython.readthedocs.io/en/latest/)
109111
- [BBC micro:bit examples on the official micro:bit website](https://microbit.org/projects/make-it-code-it/?filters=python)
110112

111-
### Keybindings
112-
- Push Button `A for A, B for B, C for A & B`
113-
- Refresh the simulator: `SHIFT + R`
114-
- Run the simulator: `SHIFT + F`
113+
### Keyboard Shortcuts
114+
- Push Button: <kbd>A</kbd> for Button A, <kbd>B</kbd> for Button B, <kbd>C</kbd> for Buttons A & B
115+
- Refresh the simulator: <kbd>Shift</kbd> + <kbd>R</kbd>
116+
- Run the simulator: <kbd>Shift</kbd> + <kbd>F</kbd>
117+
118+
## Adafruit CLUE Simulator
119+
NOTE: This simulator is hidden under the preview mode flag. See below on how to enable the preview mode flag.
120+
121+
122+
### Features
123+
- IntelliSense and syntax highlighting for CircuitPython code for the following drivers and libraries:
124+
- `adafruit_clue`
125+
- `adafruit_slideshow`
126+
- `adafruit_display_shapes`
127+
- `adafruit_display_text`
128+
- `adafruit_bitmap_font`
129+
- `adafruit_fancyled`
130+
- `neopixel`
131+
- `displayio`
132+
- Template file generation
133+
- Integrated Python Debugging for the Simulator
134+
- Deploy CircuitPython code to the physical device
135+
- Serial monitor (available on Windows and Mac only)
136+
- Simulation of the CLUE device, including:
137+
- 240x240 color screen
138+
- Push Buttons A and B
139+
- Sensors for:
140+
- Temperature
141+
- Light
142+
- Color
143+
- Acceleration
144+
- Humidity
145+
- Pressure
146+
- Proximity
147+
- Gestures
148+
- Gyro
149+
- Magnetic Field
150+
151+
### Useful Links
152+
- Tutorials and Example Code for Adafruit CLUE:
153+
- [Adafruit CLUE Overview](https://learn.adafruit.com/adafruit-clue)
154+
- [Adafruit CLUE Examples on GitHub](https://github.com/adafruit/Adafruit_CircuitPython_CLUE/tree/master/examples)
155+
156+
### Keyboard Shortcuts
157+
- Push Button: <kbd>A</kbd> for Button A, <kbd>B</kbd> for Button B, <kbd>C</kbd> for Buttons A & B
158+
- Refresh the simulator: <kbd>Shift</kbd> + <kbd>R</kbd>
159+
- Run the simulator: <kbd>Shift</kbd> + <kbd>F</kbd>
160+
161+
## How to enable preview flag
162+
Currently, we have our Adafruit CLUE simulator hidden behind a preview flag and we want you to try it out!
163+
### I. Open settings
164+
For Windows and Linux, you can use <kbd>Ctrl</kbd> + <kbd>,</kbd> or use `File -> Preferences -> Settings` in the top menu to navigate to settings. For Mac, you can use <kbd>Cmd</kbd> + <kbd>,</kbd> or use `Code -> Preferences -> Settings`.
165+
166+
<img alt='Adafruit CLUE' src='https://github.com/raw/microsoft/vscode-python-devicesimulator/dev/assets/readmeFiles/clue/open_settings.PNG'>
167+
168+
### II. Search for our preview flag and enable it!
169+
In the top search bar, search for `DeviceSimulatorExpress.previewMode`. Then, check the checkbox for the setting that pops up when you serach.
170+
171+
172+
<img alt='Adafruit CLUE' src='https://github.com/raw/microsoft/vscode-python-devicesimulator/dev/assets/readmeFiles/clue/check_preview_mode.gif'>
115173

116174
## How to use
117175

118176
To use Device Simulator Express, install the extension from the marketplace and reload VS Code.
119177

120-
To access many of the commands, you need to open the command palette. This can be done with `CTRL + SHIFT + P` for Windows and Linux / `CMD + SHIFT + P` for Mac. It can also be accessed from the toolbar by going to `View -> Command Palette`.
178+
To access many of the commands, you need to open the command palette. This can be done with <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> for Windows and Linux / <kbd>Cmd</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> for Mac. It can also be accessed from the toolbar by going to `View -> Command Palette`.
121179

122180
### I. Take a look at the "Device Simulator Express: Getting Started" Command.
123-
1. Type in `"Device Simulator Express: Getting Started"` in the command palette (`CTRL + SHIFT + P` / `CMD + SHIFT + P` to open the command palette).
181+
1. Type in `"Device Simulator Express: Getting Started"` in the command palette (<kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> / <kbd>Cmd</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> to open the command palette).
124182
2. Choose the the device you want to play with from the dropdown.
125183
3. Read, copy and learn some of the things you can do with the simulator!
126184

127185
<img alt='Getting Started' src='https://github.com/raw/microsoft/vscode-python-devicesimulator/dev/assets/readmeFiles/getting_started.png'>
128186

129187
### II. Start with the "Device Simulator Express: New File" Command.
130-
1. Type in `"Device Simulator Express: New File"` in the command palette (`CTRL + SHIFT + P` / `CMD + SHIFT + P` to open the command palette).
188+
1. Type in `"Device Simulator Express: New File"` in the command palette (<kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> / <kbd>Cmd</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> to open the command palette).
131189
2. Select the device you want to use.
132190
3. Name and save your file somewhere, and we’re good to go!
133191
4. Start with some examples: you can find examples files and tutorials inside the comments at the top of the file.
@@ -176,7 +234,7 @@ Before deploying the Python code to your CPX device, you need to format your dev
176234

177235
### Commands
178236

179-
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:
237+
Device Simulator Express provides several commands in the Command Palette (<kbd>F1</kbd> or <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> / <kbd>Cmd</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> for Mac OS) for working with \*.py files:
180238

181239
- `Device Simulator Express: Getting Started`: Opens a page in VS Code that helps users get started with the extension. Here, users can browse through code that they can use to play with the simulators.
182240
- `Device Simulator Express: Run Simulator`: Runs Python code on the simulator.
@@ -229,9 +287,9 @@ A `ThirdPartyNotices.txt` file is provided in the extension's source code listin
229287

230288
- The first time you install the extension, you'll need to execute the `run` command at least once in order to access auto-completion.
231289
- 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.
232-
- To open the output panel again after closing it go to VS Code menu: `View->Output`.
290+
- To open the output panel again after closing it go to VS Code menu: `View -> Output`.
233291
- If you try to deploy to the CPX while it's plugged in but you still get an error saying it cannot find the board, make sure your device is formatted correctly and that its name matches `CIRCUITPY`.
234-
- 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: [<device_name>] Debugger Server Port"`. You can either change it (usually ports above 5000 should work) or try to free it, then start debugging again.
292+
- 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.
235293
- When you are using the serial monitor, if you get some unusual error messages, unplug the device and reload the VS Code windows.
236294

237295
## License
476 KB
Loading

assets/readmeFiles/clue/clue.png

264 KB
Loading
182 KB
Loading

0 commit comments

Comments
 (0)