You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added connection-specific interfaces and factory functions for exporting instead (#50)
* Added specific interfaces for different connection types. This is helpful for mocking.
* Exported new factory functions for creating the connections instead of the class.
* Updated demo and docs to match changes.
Copy file name to clipboardExpand all lines: README.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# micro:bit connection library
2
2
3
-
[This documentation is best viewed on the documentation site rather than GitHub](https://microbit-foundation.github.io/microbit-connection/).
3
+
<ahref="https://microbit-foundation.github.io/microbit-connection/"class="typedoc-ignore">This documentation is best viewed on the documentation site rather than GitHub or NPM package site.</a>
4
4
5
5
This is a JavaScript library for micro:bit connections in browsers via USB and Bluetooth.
6
6
@@ -18,12 +18,12 @@ This project is a work in progress. We are extracting WebUSB and Web Bluetooth c
18
18
19
19
### Flash a micro:bit
20
20
21
-
Instantiate a WebUSB connection using {@linkMicrobitWebUSBConnection} class and use it to connect to a micro:bit.
21
+
Instantiate a WebUSB connection using {@linkcreateWebUSBConnection} class and use it to connect to a micro:bit.
@@ -80,20 +80,20 @@ For more examples of using other methods in the {@link MicrobitWebUSBConnection}
80
80
81
81
By default, the micro:bit's Bluetooth service is not enabled. Visit our [Bluetooth tech site page](https://tech.microbit.org/bluetooth/) to download a hex file that would enable the bluetooth service.
82
82
83
-
Instantiate a Bluetooth connection using {@linkMicrobitWebBluetoothConnection} class and use it to connect to a micro:bit.
83
+
Instantiate a Bluetooth connection using {@linkcreateWebBluetoothConnection} class and use it to connect to a micro:bit.
{@link ConnectionStatus | Connection status} is `"CONNECTED"` if connection succeeds.
95
95
96
-
For more examples of using other methods in the {@linkMicrobitWebBluetoothConnection} class, see our [demo code](https://github.com/microbit-foundation/microbit-connection/blob/main/src/demo.ts) for our [demo site](https://microbit-connection.pages.dev/).
96
+
For more examples of using other methods in the {@linkcreateWebBluetoothConnection} class, see our [demo code](https://github.com/microbit-foundation/microbit-connection/blob/main/src/demo.ts) for our [demo site](https://microbit-connection.pages.dev/).
0 commit comments