integrating docs about "devices" namespace
This commit is contained in:
@ -26,11 +26,11 @@ control.inBackground(() => {
|
||||
## Advanced
|
||||
|
||||
```namespaces
|
||||
bluetooth.onBluetoothConnected(() => {
|
||||
|
||||
});
|
||||
devices.tellCameraTo(MesCameraEvent.TakePhoto);
|
||||
bluetooth.onBluetoothConnected(() => {});
|
||||
```
|
||||
|
||||
```package
|
||||
microbit-devices
|
||||
microbit-bluetooth
|
||||
```
|
19
docs/reference/devices.md
Normal file
19
docs/reference/devices.md
Normal file
@ -0,0 +1,19 @@
|
||||
# Devices
|
||||
|
||||
Control a phone with the BBC micro:bit via Bluetooth.
|
||||
|
||||
```cards
|
||||
devices.tellCameraTo(MesCameraEvent.TakePhoto);
|
||||
devices.tellRemoteControlTo(MesRemoteControlEvent.play);
|
||||
devices.raiseAlertTo(MesAlertEvent.DisplayToast);
|
||||
devices.onNotified(MesDeviceInfo.IncomingCall, () => {
|
||||
|
||||
});
|
||||
devices.onGamepadButton(MesDpadButtonInfo.ADown, () => {
|
||||
|
||||
});
|
||||
devices.signalStrength();
|
||||
devices.onSignalStrengthChanged(() => {
|
||||
|
||||
});
|
||||
```
|
Reference in New Issue
Block a user