Compare commits

..

3 Commits

Author SHA1 Message Date
ee8505b4f1 0.2.156 2016-06-08 14:52:16 -07:00
ab4e2c458a Bump pxt-core to 0.2.168 2016-06-08 14:52:15 -07:00
126c236b14 New topic. Double-checked example. 2016-06-08 11:21:58 -07:00
2 changed files with 38 additions and 2 deletions

View File

@ -0,0 +1,36 @@
# Received Signal Strength
Find how strong the ``radio`` signal is, from `255` to `0`.
(`255` means a weak signal and `0` means a strong one.)
The micro:bit finds the signal strength by checking how strong it was
the last time it ran the
[receive number](/reference/radio/receive-number) function. That means
it needs to run **receive number** first.
### Returns
* a [number](/reference/types/number) between `255` and `0` that means
how strong the signal is.
## Simulator
This function only works on the micro:bit, not in browsers.
### Example
This example shows how strong the radio signal of the
[light level sender example](/reference/input/send-number) is.
```blocks
let x = 0;
radio.setGroup(99);
basic.forever(() => {
x = radio.receiveNumber();
basic.showNumber(radio.receivedSignalStrength());
});
```
### See also
[receive number](/reference/radio/receive-number), [send number](/reference/radio/send-number), [on data received](/reference/radio/on-data-received)

View File

@ -1,6 +1,6 @@
{
"name": "pxt-microbit",
"version": "0.2.155",
"version": "0.2.156",
"description": "BBC micro:bit target for PXT",
"keywords": [
"JavaScript",
@ -29,6 +29,6 @@
"typescript": "^1.8.7"
},
"dependencies": {
"pxt-core": "0.2.167"
"pxt-core": "0.2.168"
}
}