Deprecating old radio APIs and fixing docs (#289)

This commit is contained in:
Richard Knoll
2016-10-24 16:30:21 -07:00
committed by Peli de Halleux
parent ba69563bf4
commit ec404e5887
25 changed files with 205 additions and 163 deletions

View File

@ -1,5 +1,7 @@
# Receive Number
> Note: This API has been deprecated! Use [on data packet received](/reference/radio/on-data-packet-received) instead.
Receives the next number sent by a micro:bit in the same ``radio`` group.
```sig
@ -10,10 +12,6 @@ radio.receiveNumber();
* the first [number](/reference/types/number) that the micro:bit received. If it did not receive any numbers, this function will return `0`.
### Simulator
This function only works on the micro:bit, not in browsers.
### Example: Simple number receiver
This example receives the number broadcasted another micro:bit and shows it
@ -25,7 +23,7 @@ radio.onDataReceived(() => {
})
```
### Example: Light level receiver
### Example: Light level receiver
This example shows the light level from the [light level sender example](/reference/radio/send-number)
as a number.