diff --git a/website/docs/api/cli.mdx b/website/docs/api/cli.mdx index 48dacaa27f..b8881ff0aa 100644 --- a/website/docs/api/cli.mdx +++ b/website/docs/api/cli.mdx @@ -59,7 +59,7 @@ devs init --force ### --no-install -Do not run `npm` or `yarn ` install after dropping the files. +Do not run `npm` or `yarn` install after dropping the files. ### --board board-id diff --git a/website/docs/api/clients-custom/gamepad-registers.mdp b/website/docs/api/clients-custom/gamepad-registers.mdp index e6aee4b77a..dd7f33d3ab 100644 --- a/website/docs/api/clients-custom/gamepad-registers.mdp +++ b/website/docs/api/clients-custom/gamepad-registers.mdp @@ -1,7 +1,7 @@ ### axes {#ro:axes} An array representing the controls with axes present on the device (e.g. analog thumb sticks), -as `[x, y]`. Each entry in the array is a floating point value in the range ` -1.0 – 1.0``, representing the axis position from the lowest value ( `-1.0`) to the highest value (`1.0`). +as `[x, y]`. Each entry in the array is a floating point value in the range `-1.0 – 1.0`, representing the axis position from the lowest value (`-1.0`) to the highest value (`1.0`). - type: `ClientRegister<{ x: number; y: number }>` (packing format `i1.15 i1.15`) diff --git a/website/docs/api/clients-custom/index.mdp b/website/docs/api/clients-custom/index.mdp index 97e2c24769..c283e022b4 100644 --- a/website/docs/api/clients-custom/index.mdp +++ b/website/docs/api/clients-custom/index.mdp @@ -1,7 +1,7 @@ In DeviceScript, hardware peripherals (and generally anything outside the VM) are modelled as [Jacdac services](https://microsoft.github.io/jacdac-docs/services/). -The peripherals are **servers** and the your client application creates **clients** to interact with them. +The peripherals are **servers** and your client application creates **clients** to interact with them. ## Declaring roles diff --git a/website/docs/api/core/registers.md b/website/docs/api/core/registers.md index 86271e60d9..e8d91c5f60 100644 --- a/website/docs/api/core/registers.md +++ b/website/docs/api/core/registers.md @@ -9,7 +9,7 @@ The register client classe (`Register`) allow to read, write and track change Aside from the data type, there are 3 different type of access control on registers: - `read only`: the value can be read, but not written. -- `read write`: the value can be read and writen. +- `read write`: the value can be read and written. - `const`: the value of the register is constant. It may change on the next reset but this is not a common scenario. ## read diff --git a/website/docs/api/drivers/accelerometer.md b/website/docs/api/drivers/accelerometer.md index 765e7ddaa7..253fd4e886 100644 --- a/website/docs/api/drivers/accelerometer.md +++ b/website/docs/api/drivers/accelerometer.md @@ -5,7 +5,7 @@ title: Accelerometer # Accelerometer -The `startAccelerometer` function starts a [accelerometer](https://microsoft.github.io/jacdac-docs/services/accelerometer) server on the device and returns a [client](/api/clients/accelerometer). +The `startAccelerometer` function starts an [accelerometer](https://microsoft.github.io/jacdac-docs/services/accelerometer) server on the device and returns a [client](/api/clients/accelerometer). The accelerometer IMU chip will be auto-detected if it is supported. diff --git a/website/docs/api/drivers/aht20.md b/website/docs/api/drivers/aht20.md index 3c02f4a7db..dab4b57415 100644 --- a/website/docs/api/drivers/aht20.md +++ b/website/docs/api/drivers/aht20.md @@ -15,4 +15,4 @@ const { temperature, humidity } = await startAHT20() ## Configuration -- Configure I2C throught the [board configuration](/developer/board-configuration) +- Configure I2C through the [board configuration](/developer/board-configuration) diff --git a/website/docs/api/drivers/bme680.md b/website/docs/api/drivers/bme680.md index 161f7ea2ab..8e5f527de0 100644 --- a/website/docs/api/drivers/bme680.md +++ b/website/docs/api/drivers/bme680.md @@ -16,5 +16,5 @@ const { temperature, humidity, pressure, airQualityIndex } = await startBME680() ## Configuration -- Configure I2C throught the [board configuration](/developer/board-configuration) +- Configure I2C through the [board configuration](/developer/board-configuration) - Check that you are using the correct I2C address diff --git a/website/docs/api/drivers/imu.mdx b/website/docs/api/drivers/imu.mdx index 51bdd5af6d..ae54121dd7 100644 --- a/website/docs/api/drivers/imu.mdx +++ b/website/docs/api/drivers/imu.mdx @@ -1,23 +1,23 @@ ---- -title: IMU -description: Reading from the IMU ---- - -## Usage - -Here we use the IMU to read the orientation of the device, DA213B for example. - -```ts -import { - startIMU, - startAccelerometer, - DA213BDriver, -} from "@devicescript/drivers" - -const driver = new DA213BDriver() -const acc = await startAccelerometer(driver, {}) - -acc.reading.subscribe(reading => { - console.log(`x: ${reading[0]}, y: ${reading[0]}, z: ${reading[0]}`) -}) -``` +--- +title: IMU +description: Reading from the IMU +--- + +## Usage + +Here we use the IMU to read the orientation of the device, DA213B for example. + +```ts +import { + startIMU, + startAccelerometer, + DA213BDriver, +} from "@devicescript/drivers" + +const driver = new DA213BDriver() +const acc = await startAccelerometer(driver, {}) + +acc.reading.subscribe(reading => { + console.log(`x: ${reading[0]}, y: ${reading[0]}, z: ${reading[0]}`) +}) +``` diff --git a/website/docs/api/drivers/index.mdx b/website/docs/api/drivers/index.mdx index 4f225ba483..990ec58ce4 100644 --- a/website/docs/api/drivers/index.mdx +++ b/website/docs/api/drivers/index.mdx @@ -1,6 +1,6 @@ # Drivers -Starting driver provide a programming abstraction for hardware periphericals. +Starting driver provide a programming abstraction for hardware peripherals. Some driver implementations are builtin (written C), while others can be contributed as DeviceScript packages. diff --git a/website/docs/api/drivers/st7789.mdx b/website/docs/api/drivers/st7789.mdx index e91894813d..c32e233557 100644 --- a/website/docs/api/drivers/st7789.mdx +++ b/website/docs/api/drivers/st7789.mdx @@ -22,7 +22,7 @@ import { ILI9341Driver } from "@devicescript/drivers" :::caution I8080 not supported -The drivers use the SPI interface. The parralel interface (I8080) is not supported at the moment. +The drivers use the SPI interface. The parallel interface (I8080) is not supported at the moment. ::: diff --git a/website/docs/api/observables/dsp.mdx b/website/docs/api/observables/dsp.mdx index 72a8144d94..14343d045e 100644 --- a/website/docs/api/observables/dsp.mdx +++ b/website/docs/api/observables/dsp.mdx @@ -36,7 +36,7 @@ thermometer.reading ## fir -A general purpose Finite Response Filter filter. Coefficients are typically computed in a seperate process. +A general purpose Finite Response Filter filter. Coefficients are typically computed in a separate process. ```ts import { Temperature } from "@devicescript/core" diff --git a/website/docs/api/observables/filter.mdx b/website/docs/api/observables/filter.mdx index 201c9a48f8..b6aa8b0692 100644 --- a/website/docs/api/observables/filter.mdx +++ b/website/docs/api/observables/filter.mdx @@ -141,7 +141,7 @@ thermometer.reading Returns a result Observable that emits all values pushed by the source observable if they are distinct in comparison to the last value the result observable emitted. -This function can be used to create user-friendly transformer. For example, thershold is as follows: +This function can be used to create user-friendly transformer. For example, threshold is as follows: ```ts skip export function threshold( diff --git a/website/docs/api/runtime/palette.mdx b/website/docs/api/runtime/palette.mdx index b958b8d316..e88dfa4648 100644 --- a/website/docs/api/runtime/palette.mdx +++ b/website/docs/api/runtime/palette.mdx @@ -26,7 +26,7 @@ palette.setAt(2, 0x00_00_ff) ## `interpolateColor` -Interpolates a `[0, 1]` value into a color of the palette, regarless of the palette size. +Interpolates a `[0, 1]` value into a color of the palette, regardless of the palette size. ```ts import { Palette } from "@devicescript/graphics" diff --git a/website/docs/api/runtime/pixelbuffer.mdx b/website/docs/api/runtime/pixelbuffer.mdx index 5d1b095ed3..d0066f0214 100644 --- a/website/docs/api/runtime/pixelbuffer.mdx +++ b/website/docs/api/runtime/pixelbuffer.mdx @@ -69,11 +69,11 @@ pixels.rotate(-1) ## Helpers -Here are a few helpers built for `PixelBuffer`, but many other could be added! +Here are a few helpers built for `PixelBuffer`, but many others could be added! ### `fillSolid` -This helper function asigns the given color to the entire range. +This helper function assigns the given color to the entire range. ```ts import { Led } from "@devicescript/core" @@ -110,7 +110,7 @@ but this can be changed with optional parameters. ### `fillGradient` -Fills with a linear interpolation of two colors accross the RGB space. +Fills with a linear interpolation of two colors across the RGB space. ```ts import { Led } from "@devicescript/core" diff --git a/website/docs/api/vm.mdx b/website/docs/api/vm.mdx index 775cdeabe4..9ca6f67b40 100644 --- a/website/docs/api/vm.mdx +++ b/website/docs/api/vm.mdx @@ -75,7 +75,7 @@ const running = vm.devsIsRunning() ## devsInit This method allocates data structures necessary for running the virtual machine. -It is automatically called by other metods. +It is automatically called by other methods. ```js vm.devsInit() @@ -83,7 +83,7 @@ vm.devsInit() ## devsVerify -Verifies that a buffer of bytecode is well formed. Returns non-zero error codes when failing. +Verifies that a buffer of bytecode is well-formed. Returns non-zero error codes when failing. ```js const res = vm.devsVerify() diff --git a/website/docs/developer/board-configuration.mdx b/website/docs/developer/board-configuration.mdx index 66b764eb6c..ebc37ff993 100644 --- a/website/docs/developer/board-configuration.mdx +++ b/website/docs/developer/board-configuration.mdx @@ -5,7 +5,7 @@ sidebar_position: 2.9 # Board Configuration -**To target a specific hardware board or peripherical, +**To target a specific hardware board or peripheral, you need to configure the pins, I2C, SPI, etc...** This is done by loading the board configuration package for your specific hardware. @@ -20,7 +20,7 @@ import { pins } from "@dsboard/adafruit_qt_py_c3" :::tip In Visual Studio Code, on the file menu, click on the **wand** icon and select the board configuration. -If your board is already connectd, DeviceScript will automatically detect it and +If your board is already connected, DeviceScript will automatically detect it and load the correct board configuration. ::: diff --git a/website/docs/developer/development-gateway/environment.mdx b/website/docs/developer/development-gateway/environment.mdx index 980e5ee1eb..0c7d63436c 100644 --- a/website/docs/developer/development-gateway/environment.mdx +++ b/website/docs/developer/development-gateway/environment.mdx @@ -11,7 +11,7 @@ keywords: --- # Environment -An configuration object pushed from the cloud as an observable. The environment can be configured +A configuration object pushed from the cloud as an observable. The environment can be configured through the gateway OpenAPI or the Visual Studio Code extension. The environment is cached locally in the settings to handle offline scenarios. diff --git a/website/docs/developer/development-gateway/gateway.mdx b/website/docs/developer/development-gateway/gateway.mdx index 779c95cff7..4699d0089a 100644 --- a/website/docs/developer/development-gateway/gateway.mdx +++ b/website/docs/developer/development-gateway/gateway.mdx @@ -15,7 +15,7 @@ keywords: DeviceScript defines a cloud layer to abstract the communication between the device and a cloud provider. -In order to facilite rapid prototyping, +In order to facilitate rapid prototyping, it is possible to run a Development Gateway **locally** or deploy it to Azure on top of Azure services. @@ -23,7 +23,7 @@ or deploy it to Azure on top of Azure services. ## Features -- Local or Azure deployement +- Local or Azure deployment - Device provisioning, management: register, unregister, list, ... - Script management: create, update (versioned) - Script deployment: assign a script to a device and the gateway will deploy it @@ -209,7 +209,7 @@ npm run provision ``` After the script is done executing, -it will take a couple minutes for the Github Actions to build the site and start it. +it will take a couple of minutes for the Github Actions to build the site and start it. - open the swagger page, `https://WEBAPPNAME.azurewebsites.net/swagger/` and make sure it loads diff --git a/website/docs/developer/development-gateway/index.mdx b/website/docs/developer/development-gateway/index.mdx index a47f74a176..e89e61ed0f 100644 --- a/website/docs/developer/development-gateway/index.mdx +++ b/website/docs/developer/development-gateway/index.mdx @@ -39,5 +39,5 @@ This package relies on a prototype Development Gateway that needs to be deployed ## View in Visual Studio Code -The view is hidden by default and needs to be show once. Click on **View**, **Open View...** and selet +The view is hidden by default and needs to be show once. Click on **View**, **Open View...** and select **Development Gateway** under **DeviceScript**. diff --git a/website/docs/developer/development-gateway/telemetry.mdx b/website/docs/developer/development-gateway/telemetry.mdx index 119ffb481f..22b7c9a7cc 100644 --- a/website/docs/developer/development-gateway/telemetry.mdx +++ b/website/docs/developer/development-gateway/telemetry.mdx @@ -47,7 +47,7 @@ await trackEvent("started") ### Metrics -The metric aggregates a numberical value and upload the aggregate when requested. +The metric aggregates a numerical value and upload the aggregate when requested. ```ts import { Temperature } from "@devicescript/core" diff --git a/website/docs/developer/drivers/analog.mdx b/website/docs/developer/drivers/analog.mdx index 4c5303b9d1..ba93276ef3 100644 --- a/website/docs/developer/drivers/analog.mdx +++ b/website/docs/developer/drivers/analog.mdx @@ -6,7 +6,7 @@ sidebar_position: 10 # Analog -There is a number of functions that start a simple analog sensor server. +There are a number of functions that start a simple analog sensor server. We'll use `startPotentiometer()` as an example, but you can use any of the following, as they all use the same configuration. diff --git a/website/docs/developer/drivers/digital-io/index.mdx b/website/docs/developer/drivers/digital-io/index.mdx index 85bd84f84b..051bee4301 100644 --- a/website/docs/developer/drivers/digital-io/index.mdx +++ b/website/docs/developer/drivers/digital-io/index.mdx @@ -9,7 +9,7 @@ sidebar_position: 49 DeviceScript provides access to digital GPIO (General Purpose Input/Output) operations on pins that do **not** require precise real time timings. -It is recommend to encapsulate the GPIO access into server implementation as they are rather low level. +It is recommended to encapsulate the GPIO access into server implementation as they are rather low level. :::caution @@ -21,7 +21,7 @@ natively in C using interrupts, or better yet offload it to an [external Jacdac ## Pin mappings -While you can use hardware GPIO numbers with the `ds.gpio()` function, +While you can use hardware GPIO numbers with the `ds.gpio()` function, it is highly recommended that you instead import a board definition file an use pin names matching silk on the hardware. diff --git a/website/docs/developer/drivers/i2c.mdx b/website/docs/developer/drivers/i2c.mdx index cdd1c463a1..9b053ef214 100644 --- a/website/docs/developer/drivers/i2c.mdx +++ b/website/docs/developer/drivers/i2c.mdx @@ -61,4 +61,3 @@ class AHT20Driver extends I2CSensorDriver<{ ``` You can find implementation examples at https://github.com/microsoft/devicescript/tree/main/packages/drivers/src. - diff --git a/website/docs/developer/drivers/index.mdx b/website/docs/developer/drivers/index.mdx index 3761f0889b..c00faf7f7b 100644 --- a/website/docs/developer/drivers/index.mdx +++ b/website/docs/developer/drivers/index.mdx @@ -6,9 +6,9 @@ sidebar_position: 2.5 # Drivers In DeviceScript, any hardware component is accessed through a service **client**. -A **driver** implement one or more service **servers** for a given hardware peripherical. +A **driver** implement one or more service **servers** for a given hardware peripheral. -The [drivers builtin package](/developer/packages) exposes drivers for a number of periphericals. +The [drivers builtin package](/developer/packages) exposes drivers for a number of peripherals. ## [Analog](/developer/drivers/analog) (builtin) diff --git a/website/docs/developer/errors.mdx b/website/docs/developer/errors.mdx index 61d539d023..752a124cc1 100644 --- a/website/docs/developer/errors.mdx +++ b/website/docs/developer/errors.mdx @@ -70,6 +70,6 @@ or the tool will give up. ## error can't alloc pcb {#error-cant-alloc-pcb} -TLS is not yet supported on RP2040. -See [implementation status](https://microsoft.github.io/devicescript/devices#implementation-status) +TLS is not yet supported on RP2040. +See [implementation status](https://microsoft.github.io/devicescript/devices#implementation-status) and [issue 664](https://github.com/microsoft/devicescript/issues/664). \ No newline at end of file diff --git a/website/docs/developer/graphics/display.mdx b/website/docs/developer/graphics/display.mdx index 0b6d47bdda..599e1009fa 100644 --- a/website/docs/developer/graphics/display.mdx +++ b/website/docs/developer/graphics/display.mdx @@ -7,7 +7,7 @@ title: Display The [Display](https://github.com/microsoft/devicescript/blob/main/packages/graphics/src/display.ts) interface provides an abstraction over a small screen. The `Display` interface is implemented -for various hardware peripherical and can be used with various services. +for various hardware peripherals and can be used with various services. - [SSD1306](/api/drivers/ssd1306) or [SH110X](/api/drivers/sh110x), OLED monochrome, I2C - [ST7789, ST7735, ILI9163, ILI9341](/api/drivers/st7789), LCD color, SPI @@ -15,7 +15,7 @@ for various hardware peripherical and can be used with various services. :::caution I8080 not supported -The drivers use SPI or I2C. The parralel interface (I8080) is not supported at the moment. +The drivers use SPI or I2C. The parallel interface (I8080) is not supported at the moment. ::: diff --git a/website/docs/developer/leds/display.mdx b/website/docs/developer/leds/display.mdx index 2be0aa3c8f..2f7990fd08 100644 --- a/website/docs/developer/leds/display.mdx +++ b/website/docs/developer/leds/display.mdx @@ -20,7 +20,7 @@ display.image.print(`Hello world!`, 3, 10) await display.show() ``` -The palette is automatically infered from the `waveLength` register; otherwise you can provide one. +The palette is automatically inferred from the `waveLength` register; otherwise you can provide one. ```ts skip const display = await startLedDisplay(led, palette) diff --git a/website/docs/developer/mcu-temperature.mdx b/website/docs/developer/mcu-temperature.mdx index 21dfc6082e..0561689b03 100644 --- a/website/docs/developer/mcu-temperature.mdx +++ b/website/docs/developer/mcu-temperature.mdx @@ -18,4 +18,4 @@ setInterval(async () => { }, 1000) ``` -The simulator temperature is alwasy 21 degrees Celsius. \ No newline at end of file +The simulator temperature is always 21 degrees Celsius. \ No newline at end of file diff --git a/website/docs/developer/net/encrypted-fetch.mdx b/website/docs/developer/net/encrypted-fetch.mdx index e740bd695b..8ae2fb0653 100644 --- a/website/docs/developer/net/encrypted-fetch.mdx +++ b/website/docs/developer/net/encrypted-fetch.mdx @@ -196,7 +196,7 @@ The JSON object is converted to a buffer and encrypted using AES-256-CCM and an 8-byte authentication tag is appended. The initialization vector (IV) is all-zero. -This is send to the server, which decrypts the request accordingly. +This is sent to the server, which decrypts the request accordingly. :::warning @@ -206,7 +206,7 @@ Otherwise, someone can replay a client request. ::: -If the server responds with with `2xx` code, the response is assumed to be +If the server responds with `2xx` code, the response is assumed to be a JSON object encrypted using a key derived using HKDF from the password, the previously generated salt, and `info` parameter set to the value of `x-devs-enc-fetch-info` in the response. diff --git a/website/docs/developer/net/mqtt.mdx b/website/docs/developer/net/mqtt.mdx index a8c54037c9..59343632f0 100644 --- a/website/docs/developer/net/mqtt.mdx +++ b/website/docs/developer/net/mqtt.mdx @@ -57,7 +57,7 @@ await mqtt.publish(`devs/log/${id}`, "hello") ## subscribe The `subscribe` function creates a subscription for a topic route. -The function takes a an optional handler an returns an [observable](/developer/observables). +The function takes an optional handler and returns an [observable](/developer/observables). ```ts import { startMQTTClient } from "@devicescript/net"