Remove the 'devices' reference pages (#4022)

This commit is contained in:
Galen Nickel 2021-04-27 21:33:04 -07:00 коммит произвёл GitHub
Родитель ea7589f0fa
Коммит e834fab3c8
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
11 изменённых файлов: 2 добавлений и 409 удалений

Просмотреть файл

@ -325,14 +325,6 @@
* [stop advertising](/reference/bluetooth/stop-advertising)
* [advertise uid](/reference/bluetooth/advertise-uid)
* [advertise-uid-buffer](/reference/bluetooth/advertise-uid-buffer)
* [Devices](/reference/devices)
* [tell camera to](/reference/devices/tell-camera-to)
* [tell remote control to](/reference/devices/tell-remote-control-to)
* [raise alert to](/reference/devices/raise-alert-to)
* [on notified](/reference/devices/on-notified)
* [on gamepad button](/reference/devices/on-gamepad-button)
* [signal strength](/reference/devices/signal-strength)
* [on signal strength changed](/reference/devices/on-signal-strength-changed)
## #packages

Просмотреть файл

@ -11,6 +11,7 @@ music.playTone(0, 0);
led.plot(0, 0);
radio.sendNumber(0);
```
## Advanced
```namespaces
@ -33,15 +34,13 @@ control.inBackground(() => {
```namespaces
bluetooth.onBluetoothConnected(() => {});
devices.tellCameraTo(MesCameraEvent.TakePhoto);
```
```package
radio
devices
bluetooth
```
## See Also
[basic](/reference/basic), [input](/reference/input), [music](/reference/music), [led](/reference/led), [Math (blocks)](/blocks/math), [String](/types/string), [game](/reference/game), [images](/reference/images), [pins](/reference/pins), [serial](/reference/serial), [control](/reference/control), [radio](/reference/radio), [devices](/reference/devices), [bluetooth](/reference/bluetooth)
[basic](/reference/basic), [input](/reference/input), [music](/reference/music), [led](/reference/led), [Math (blocks)](/blocks/math), [String](/types/string), [game](/reference/game), [images](/reference/images), [pins](/reference/pins), [serial](/reference/serial), [control](/reference/control), [radio](/reference/radio), [bluetooth](/reference/bluetooth)

Просмотреть файл

@ -1,33 +0,0 @@
# Devices
Control a phone with the @boardname@ via Bluetooth.
## ~ hint
**App required** You must use one of the [micro:bit apps](https://microbit.org/guide/mobile/) to use this functionality.
## ~
```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(() => {
});
```
```package
devices
```
## See Also
[tellCameraTo](/reference/devices/tell-camera-to), [tellRemoteControlTo](/reference/devices/tell-remote-control-to), [raiseAlertTo](/reference/devices/raise-alert-to), [onNotified](/reference/devices/on-notified), [onGamepadButton](/reference/devices/on-gamepad-button), [signalStrength](/reference/devices/signal-strength), [onSignalStrengthChanged](/reference/devices/on-signal-strength-changed)

Просмотреть файл

@ -1,25 +0,0 @@
# On Gamepad Button
Register code to run when the @boardname@ receives a command from the paired gamepad.
## ~hint
**App required** You must use one of the [micro:bit apps](https://microbit.org/guide/mobile/) to use this functionality.
## ~
```sig
devices.onGamepadButton(MesDpadButtonInfo.ADown, () => {})
```
## Parameters
* ``body``: Action code to run when the the @boardname@ receives a command from the paired gamepad.
## See Also
[tell remote control to](/reference/devices/tell-remote-control-to), [raise alert to](/reference/devices/raise-alert-to), [signal strength](/reference/devices/signal-strength), [on signal strength changed](/reference/devices/on-signal-strength-changed)
```package
devices
```

Просмотреть файл

@ -1,35 +0,0 @@
# On Notified
Register code to run when the signal strength of the paired device changes.
## ~hint
**App required** You must use one of the [micro:bit apps](https://microbit.org/guide/mobile/) to use this functionality.
## ~
```sig
devices.onNotified(MesDeviceInfo.IncomingCall, () => {})
```
## Parameters
* ``body``: code to run when the signal strength changes.
## Examples
Display the signal strength on screen:
```blocks
devices.onNotified(MesDeviceInfo.IncomingCall, () => {
basic.showString("RING RING")
})
```
## See Also
[tell remote control to](/reference/devices/tell-remote-control-to), [raise alert to](/reference/devices/raise-alert-to), [signal strength](/reference/devices/signal-strength)
```package
devices
```

Просмотреть файл

@ -1,37 +0,0 @@
# On Signal Strength Changed
Register code to run when the signal strength of the paired device changes.
## ~hint
**App required** You must use one of the [micro:bit apps](https://microbit.org/guide/mobile/) to use this functionality.
## ~
```sig
devices.onSignalStrengthChanged(() => {})
```
## Parameters
* ``body``: code to run when the signal strength changes.
## Examples
Display the signal strength on screen:
```blocks
devices.onSignalStrengthChanged(() => {
basic.showNumber(devices.signalStrength())
})
```
## See Also
[tell remote control to](/reference/devices/tell-remote-control-to), [raise alert to](/reference/devices/raise-alert-to), [signal strength](/reference/devices/signal-strength)
```package
devices
```

Просмотреть файл

@ -1,65 +0,0 @@
# raise alert to
Raise an alert on a remote device.
## ~hint
**App required** You must use one of the [micro:bit apps](https://microbit.org/guide/mobile/) to use this functionality.
## ~
```sig
devices.raiseAlertTo(MesAlertEvent.Vibrate)
```
## Parameters
* event - an event identifier
## Examples
To tell the connected device to display toast
```blocks
devices.raiseAlertTo(MesAlertEvent.DisplayToast)
```
To tell the connected device to vibrate
```blocks
devices.raiseAlertTo(MesAlertEvent.Vibrate)
```
To tell the connected device to play a sound
```blocks
devices.raiseAlertTo(MesAlertEvent.PlaySound)
```
To tell the connected device to play a ringtone
```blocks
devices.raiseAlertTo(MesAlertEvent.PlayRingtone)
```
To tell the connected device to find my phone
```blocks
devices.raiseAlertTo(MesAlertEvent.FindMyPhone)
```
To tell the connected device to ring alarm
```blocks
devices.raiseAlertTo(MesAlertEvent.RingAlarm)
```
## See also
[tell remote control to](/reference/devices/tell-remote-control-to), [tell camera to](/reference/devices/tell-camera-to)
```package
devices
```

Просмотреть файл

@ -1,36 +0,0 @@
# Signal Strength
Returns the signal strength reported by the paired device from ``0`` (no signal) to ``4`` (full strength).
## ~hint
**App required** You must use one of the [micro:bit apps](https://microbit.org/guide/mobile/) to use this functionality.
## ~
```sig
devices.signalStrength();
```
## Returns
* the signal strength from ``0`` (no signal) to ``4`` (full strength).
## Examples
Display the signal strength on screen:
```blocks
devices.onSignalStrengthChanged(() => {
basic.showNumber(devices.signalStrength())
})
```
## See Also
[tell remote control to](/reference/devices/tell-remote-control-to), [raise alert to](/reference/devices/raise-alert-to), [on signal strength changed](/reference/devices/on-signal-strength-changed)
```package
devices
```

Просмотреть файл

@ -1,76 +0,0 @@
# tell camera to
Access the photo/video-taking functionality of a remote device using the ``tell camera to`` function.
## ~hint
**App required** You must use one of the [micro:bit apps](https://microbit.org/guide/mobile/) to use this functionality.
## ~
```sig
devices.tellCameraTo(MesCameraEvent.TakePhoto)
```
## Parameters
* event - an event identifier
## Examples
To tell the connected device to take a picture:
```blocks
devices.tellCameraTo(MesCameraEvent.TakePhoto)
```
To tell the connected device to start recording a video:
```blocks
devices.tellCameraTo(MesCameraEvent.StartVideoCapture)
```
To tell the connected device to stop recording a video:
```blocks
devices.tellCameraTo(MesCameraEvent.StopVideoCapture)
```
To tell the connected device to toggle front-rear:
```blocks
devices.tellCameraTo(MesCameraEvent.ToggleFrontRear)
```
To tell the connected device to launch photo mode:
```blocks
devices.tellCameraTo(MesCameraEvent.LaunchPhotoMode)
```
To tell the connected device to launch video mode:
```blocks
devices.tellCameraTo(MesCameraEvent.LaunchVideoMode)
```
To tell the connected device to stop photo mode:
```blocks
devices.tellCameraTo(MesCameraEvent.StopPhotoMode)
```
To tell the connected device to stop video mode:
```blocks
devices.tellCameraTo(MesCameraEvent.StopVideoMode)
```
## See Also
[tell remote control to](/reference/devices/tell-remote-control-to), [raise alert to](/reference/devices/raise-alert-to)
```package
devices
```

Просмотреть файл

@ -1,89 +0,0 @@
# tell remote control to
Control the presentation of media content available on a remote device using the `tell remote control` to function.
## ~hint
**App required** You must use one of the [micro:bit apps](https://microbit.org/guide/mobile/) to use this functionality.
## ~
```sig
devices.tellRemoteControlTo(MesRemoteControlEvent.play)
```
## Parameters
* event - an event identifier
## Event values
* play
* stop
* pause
* forward
* rewind
* volume up
* volume down
* previous track
* next track
## Examples
To tell the connected device to start playing:
```blocks
devices.tellRemoteControlTo(MesRemoteControlEvent.play)
```
To tell the connected device to stop playing
```blocks
devices.tellRemoteControlTo(MesRemoteControlEvent.stop)
```
To tell the connected device to go to next track
```blocks
devices.tellRemoteControlTo(MesRemoteControlEvent.nextTrack)
```
To tell the connected device to go to previous track
```blocks
devices.tellRemoteControlTo(MesRemoteControlEvent.previousTrack)
```
To tell the connected device to go forward
```blocks
devices.tellRemoteControlTo(MesRemoteControlEvent.forward)
```
To tell the connected device to rewind
```blocks
devices.tellRemoteControlTo(MesRemoteControlEvent.rewind)
```
To tell the connected device volume up
```blocks
devices.tellRemoteControlTo(MesRemoteControlEvent.volumeUp)
```
To tell the connected device volume down
```blocks
devices.tellRemoteControlTo(MesRemoteControlEvent.volumeDown)
```
## See also
[tell camera to](/reference/devices/tell-camera-to), [raise alert to](/reference/devices/raise-alert-to)
```package
devices
```

Просмотреть файл

@ -33,8 +33,6 @@ This is an example of the editor with it's interface elements localized:
* [core-strings.json](https://crowdin.com/translate/kindscript/65/en-en) - Display text for the [basic](/reference/basic) and core [blocks](/reference/blocks)
* [radio-jsdoc-strings.json](https://crowdin.com/translate/kindscript/64/en-en) - Description text for code elements of the [radio](/reference/radio) blocks
* [radio-strings.json](https://crowdin.com/translate/kindscript/63/en-en) - Display text for the [radio](/reference/radio) blocks
* [devices-jsdoc-strings.json](https://crowdin.com/translate/kindscript/62/en-en) - Description text for code elements of the [devices](/reference/devices) blocks
* [devices-strings.json](https://crowdin.com/translate/kindscript/61/en-en) - Display text for the [devices](/reference/devices) blocks
* [radio-broadcast-jsdoc-strings.json](https://crowdin.com/translate/kindscript/5032/en-en) - Description text for code elements of the radio broadcast blocks
* [radio-broadcast-strings.json](https://crowdin.com/translate/kindscript/5030/en-en) - Display text for the radio broadcast blocks
* [servo-jsdoc-strings.json](https://crowdin.com/translate/kindscript/5036/en-en) - Description text for code elements of the [servo](/reference/servos) blocks