Skip to content
Closed
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
4 changes: 2 additions & 2 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ jobs:
cache: npm
- run: npm ci
- name: Build docs
run: npm run docs -w @microbit/microbit-connection
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

run: npm run docs
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./packages/microbit-connection/docs/build

deploy:
if: false
if: ${{ startsWith(github.ref, 'refs/tags/') }}
permissions:
pages: write
id-token: write
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

A TypeScript library for connecting to micro:bit devices via USB and Bluetooth. Works in browsers (via WebUSB and Web Bluetooth) and in native iOS/Android apps (Bluetooth only, via [Capacitor](https://capacitorjs.com/)).

[Available on NPM](https://www.npmjs.com/package/@microbit/microbit-connection). Migrating from an earlier version? See the [migration guide](https://github.com/microbit-foundation/microbit-connection/blob/apps/MIGRATION.md).
[Available on NPM](https://www.npmjs.com/package/@microbit/microbit-connection). Migrating from an earlier version? See the [migration guide](https://github.com/microbit-foundation/microbit-connection/blob/main/MIGRATION.md).

### Demo apps

- [Demo app](https://microbit-connection.pages.dev/) ([source](apps/demo/)) — WebUSB, Web Bluetooth, and Capacitor for native mobile
- [Demo app](https://microbit-connection.pages.dev/) ([source](https://github.com/microbit-foundation/microbit-connection/tree/main/apps/demo)) — WebUSB, Web Bluetooth, and Capacitor for native mobile

### Projects using this library

Expand Down Expand Up @@ -112,7 +112,7 @@ To disable this behaviour, pass `pauseOnHidden: false`:
const usb = createUSBConnection({ pauseOnHidden: false });
```

For more examples see the [demo app source](apps/demo/src/).
For more examples see the [demo app source](https://github.com/microbit-foundation/microbit-connection/tree/main/apps/demo).

### Connect via Bluetooth

Expand All @@ -129,7 +129,7 @@ await bluetooth.connect();
console.log("Connection status: ", bluetooth.status); // "Connected"
```

For more examples see the [demo app source](apps/demo/src/).
For more examples see the [demo app source](https://github.com/microbit-foundation/microbit-connection/tree/main/apps/demo).

### Error handling

Expand Down Expand Up @@ -165,7 +165,7 @@ Open link hex files are not common. The most common source is the micro:bit Crea

## Hardware testing

The [hardware test app](apps/hardware-test/) is a human-in-the-loop test runner for USB flashing. It covers partial and full flash, flash fallback paths, serial data integrity after flash, and reconnection after unplug. Run it with:
The [hardware test app](https://github.com/microbit-foundation/microbit-connection/tree/main/apps/hardware-test) is a human-in-the-loop test runner for USB flashing. It covers partial and full flash, flash fallback paths, serial data integrity after flash, and reconnection after unplug. Run it with:

```bash
cd apps/hardware-test
Expand All @@ -178,7 +178,7 @@ The tests prompt you for physical actions (plugging/unplugging) and verify the r

This software is under the MIT open source license.

[SPDX-License-Identifier: MIT](LICENSE)
[SPDX-License-Identifier: MIT](https://github.com/microbit-foundation/microbit-connection/blob/main/LICENSE.md)

We use dependencies via the NPM registry as specified by the package.json file under common Open Source licenses.

Expand Down
2 changes: 1 addition & 1 deletion packages/microbit-connection/src/device.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export type DeviceErrorCode =
// -- User cancelled (no error UI needed) --

/**
* **BLE.** The operation was cancelled via an {@link AbortSignal}
* **BLE.** The operation was cancelled via an AbortSignal
* supplied by the caller. No user-facing error is needed.
*/
| "aborted"
Expand Down
4 changes: 2 additions & 2 deletions packages/microbit-connection/src/service-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export interface PinValue {
*
* Contains only the input pins whose values changed since the last
* notification, up to a firmware limit of 10 pins per event
* (lowest-numbered first). Use {@link MicrobitBluetoothConnection.readPins}
* (lowest-numbered first). Use {@link @microbit/microbit-connection/bluetooth!MicrobitBluetoothConnection.readPins | readPins}
* to read all input pins on demand.
*/
export interface PinData {
Expand All @@ -72,7 +72,7 @@ export interface ButtonActionData {

/**
* A raw event from the micro:bit's message bus, received via the
* BLE Event Service. Use {@link MicrobitBluetoothConnection.subscribeToEvent}
* BLE Event Service. Use {@link @microbit/microbit-connection/bluetooth!MicrobitBluetoothConnection.subscribeToEvent | subscribeToEvent}
* to register which events the micro:bit should forward.
*/
export interface MicrobitEventData {
Expand Down
Loading