various docs fixes
This commit is contained in:
parent
2fb6025848
commit
d7c3f1b50a
@ -42,7 +42,7 @@ Overview of Blocks lessons for the BBC micro:bit.
|
||||
* [Truth or dare](/lessons/truth-or-dare), a game that forces each player to reveal a secret or do something funny with if statement
|
||||
* [Spinner](/lessons/spinner), spin the arrow with multiple if statements
|
||||
* [Die roll](/lessons/die-roll), spin with more if statements
|
||||
* [Beatbox](/lessons/beatbox), make a beatbox music player with variables
|
||||
* [Beatbox](/lessons/classic-beatbox), make a beatbox music player with variables
|
||||
* [Temperature](/lessons/temperature), get the ambient temperature (degree Celsius °C)
|
||||
|
||||
### ~
|
||||
|
@ -57,7 +57,7 @@ input.onButtonPressed(Button.A, () => {
|
||||
|
||||
### Lessons
|
||||
|
||||
[blink](/lessons/blink), [bounce-image](/lessons/bounce-image), [snowflake-fall](/lessons/snowflake-fall), [flashing-heart](/lessons/flashing-heart)
|
||||
[blink](/lessons/blink), [snowflake-fall](/lessons/snowflake-fall), [flashing-heart](/lessons/flashing-heart)
|
||||
|
||||
### See also
|
||||
|
||||
|
@ -57,5 +57,5 @@ Use [forever](/reference/basic/forever) to continually repeat an animation
|
||||
|
||||
### Lessons
|
||||
|
||||
[smiley](/lessons/smiley), [bounce image](/lessons/bounce-image), [snowflake fall](/lessons/snowflake-fall), [rotation animation](/lessons/rotation-animation)
|
||||
[smiley](/lessons/smiley), [snowflake fall](/lessons/snowflake-fall), [rotation animation](/lessons/rotation-animation)
|
||||
|
||||
|
@ -41,5 +41,5 @@ In JavaScript, the led off is represented by a `.` and the led on by a `#` chara
|
||||
|
||||
### See also
|
||||
|
||||
[plot leds](/reference/led/plot-leds), [show animation](/reference/led/show-animation)
|
||||
[plot leds](/reference/led/plot-leds), [show animation](/reference/basic/show-animation)
|
||||
|
||||
|
@ -37,5 +37,5 @@ basic.showString(s)
|
||||
|
||||
### See also
|
||||
|
||||
[String](/reference/types/string), [string functions](/reference/types/string-functions), [show number](/reference/basic/show-number), [show animation](/reference/basic/show-animation)
|
||||
[String](/reference/types/string), [show number](/reference/basic/show-number), [show animation](/reference/basic/show-animation)
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
```
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -55,5 +55,5 @@ To learn more about how the BBC micro:bit queues up and schedules event handlers
|
||||
|
||||
### see also
|
||||
|
||||
[on button pressed](/reference/input/on-button-pressed), [on logo up](/functions/on-logo-up), [on logo down](/functions/on-logo-down), [on screen up](/functions/on-screen-up), [on screen down](/functions/on-screen-down), [on shake](/reference/input/on-gesture), [on pin pressed](/reference/input/on-pin-pressed)
|
||||
[on button pressed](/reference/input/on-button-pressed), [on pin up](/reference/input/on-pin-pressed), [on shake](/reference/input/on-gesture)
|
||||
|
||||
|
@ -1,20 +1,8 @@
|
||||
# Change Score By
|
||||
|
||||
The game library
|
||||
|
||||
The game library supports simple single-player time-based games. The player will ** add points to score**.
|
||||
|
||||
## Block Editor
|
||||
|
||||
The code below shows a simple game where the user gets to press the button ``A`` as much times as possible and the score will display on the screen.
|
||||
|
||||
![](/static/mb/change-score-by-0.png)
|
||||
|
||||
## KindScript
|
||||
|
||||
The code below shows a simple game where the user gets to press the button ``A`` as much times as possible in 10 seconds.
|
||||
|
||||
```
|
||||
```blocks
|
||||
input.onButtonPressed(Button.A, () => {
|
||||
game.addScore(1)
|
||||
})
|
||||
@ -39,5 +27,5 @@ export function score() : number
|
||||
|
||||
### Lessons
|
||||
|
||||
[bop it](/lessons/bop-it) | [game of chance](/lessons/game-of-chance) | [game counter](/lessons/game-counter)
|
||||
[game of chance](/lessons/game-of-chance), [game counter](/lessons/game-counter)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user