various docs fixes

This commit is contained in:
Peli de Halleux
2016-04-15 16:15:08 -07:00
parent 2fb6025848
commit d7c3f1b50a
12 changed files with 18 additions and 58 deletions

View File

@ -8,14 +8,9 @@ The functions in the ``devices`` namespace allow the BBC micro:bit to communicat
The set of supported events will depend on the remote device and the BBC micro:bit apps available for the remote device.
### Block Editor
![](/static/mb/on-gamepad-button-0.png)
### KindScript
```
export function onGamepadButton(name: string, body:td.Action)
```sig
devices.onGamepadButton(MesDpadButtonInfo.ADown, () => {})
```
### Parameters

View File

@ -10,14 +10,8 @@ The functions in the ``devices`` namespace allow the BBC micro:bit to communicat
The set of supported events will depend on the remote device and the BBC micro:bit apps available for the remote device.
### Block Editor
![](/static/mb/on-signal-strength-changed-0.png)
### KindScript
```
export function onSignalStrengthChanged(body:td.Action)
```sig
devices.onSignalStrengthChanged(() => {})
```
### Parameters

View File

@ -4,19 +4,14 @@ The raise alert to function.
Raise an alert on a remote device.
##
## Bluetooth required
The functions in the ``devices`` namespace allow the BBC micro:bit to communicate with a separate (remote) device, such as a smartphone, over Bluetooth (Smart).
The set of supported events will depend on the remote device and the BBC micro:bit apps available for the remote device.
### KindScript
![](/static/mb/raise-alert-to-0.png)
### KindScript
```
```sig
export function raiseAlertTo(event: string)
```

View File

@ -12,14 +12,8 @@ This API does not contain any form of encryption, authentication or authorizatio
For serious applications, BLE should be considered a substantially more secure alternative.
### Block Editor
![](/static/mb/receive-number-0.png)
### KindScript
```
export function receiveNumber() : number
```sig
radio.receiveNumber();
```
### Returns

View File

@ -4,20 +4,14 @@ The `signal strength` function.
Returns the signal strength reported by the paired device from ``0`` (no signal) to ``4`` (full strength).
## Bluetooth required
## Important Security Consideration
The functions in the ``devices`` namespace allow the BBC micro:bit to communicate with a separate (remote) device, such as a smartphone, over Bluetooth (Smart).
The set of supported events will depend on the remote device and the BBC micro:bit apps available for the remote device.
### Block Editor
![](/static/mb/signal-strength-0.png)
### KindScript
```
export function signalStrength() : number
devices.signalStrength() : number
```
### Returns