ExperimentalExperimentalExperimentalExperimentalExperimentalExperimentalExperimentalExperimentalChecks if this connection type is currently available.
Use this for pre-flight UX decisions (e.g., showing "enable Bluetooth" dialog). Note: Even if this returns "available", connect() can still fail.
A promise resolving to the current availability status.
ExperimentalClear device to enable chooseDevice.
ExperimentalConnects to a currently paired device or requests pairing.
Optionaloptions: ConnectOptionsOptional connection options including progress callback and abort signal.
ExperimentalDisconnect from the device.
ExperimentalRemoves all listeners.
OptionalflashExperimentalFlash the micro:bit.
Not all connection types support flashing. For example, radio bridge connections do not support flashing, and Bluetooth connections only support flashing on native platforms (not Web).
Post-flash connection state differs by transport:
USB: The connection remains in ConnectionStatus.Connected state. USB connects to the micro:bit's interface chip (running DAPLink firmware), which is not affected by flashing the application processor, so the connection persists and serial communication is automatically reinitialised.
Bluetooth: The connection is always left in ConnectionStatus.Disconnected state. Bluetooth connects to the application processor directly, which reboots after flashing, so the connection is necessarily lost. Callers must call connect again after flashing.
The data to use.
Flash options and progress callback.
ExperimentalGet the board version.
Cached after the first successful connection until clearDevice is called, so remains available after disconnection.
the board version.
ExperimentalInitializes the device.
ExperimentalExperimentalExperimentalExperimentalExperimentalExperimentalExperimentalSets remote device.
The device id of remote micro:bit.
A connection to a remote micro:bit via a USB-connected micro:bit running radio bridge firmware. Sensor data is relayed over a serial protocol.
This connection type has limited service support compared to direct Bluetooth connections:
accelerometerdatachanged,buttonachanged,buttonbchangedevents are supported.flashis not supported.