rename micro:bit to @boardname@
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
# On Data Packet Received
|
||||
|
||||
Run part of a program when the micro:bit receives a
|
||||
Run part of a program when the @boardname@ receives a
|
||||
[number](/reference/types/number) or [string](/reference/types/string) over ``radio``.
|
||||
|
||||
|
||||
@ -19,15 +19,15 @@ To add or remove the parts of the packet from the block, try clicking the blue g
|
||||
* ``packet`` - the [packet](/reference/radio/packet) that was received by the radio. The packet has the following properties:
|
||||
* `receivedNumber` - The [number](/reference/types/number) that was sent in this packet or `0` if this packet did not contain a number. See [send number](/reference/radio/send-number) and [send value](/reference/radio/send-value)
|
||||
* `receivedString` - The [string](/reference/types/string) that was sent in this packet or the empty string if this packet did not contain a string. See [send string](/reference/radio/send-string) and [send value](/reference/radio/send-value)
|
||||
* `time` - The system time of the micro:bit that sent this packet at the time the packet was sent.
|
||||
* `serial` - The serial number of the micro:bit that sent this packet or `0` if the micro:bit did not include its serial number.
|
||||
* `time` - The system time of the @boardname@ that sent this packet at the time the packet was sent.
|
||||
* `serial` - The serial number of the @boardname@ that sent this packet or `0` if the @boardname@ did not include its serial number.
|
||||
* `signal` - How strong the radio signal is from `255` (weak) to `0` (strong).
|
||||
|
||||
### Example
|
||||
|
||||
This program keeps sending numbers that says how fast the micro:bit is
|
||||
This program keeps sending numbers that says how fast the @boardname@ is
|
||||
slowing down or speeding up. It also receives numbers for the same
|
||||
thing from nearby micro:bits. It shows these numbers as a
|
||||
thing from nearby @boardname@s. It shows these numbers as a
|
||||
[bar graph](/reference/led/plot-bar-graph).
|
||||
|
||||
```blocks
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
> Note: This API has been deprecated! Use [on data packet received](/reference/radio/on-data-packet-received) instead.
|
||||
|
||||
Run part of a program when the micro:bit receives a
|
||||
Run part of a program when the @boardname@ receives a
|
||||
[number](/reference/types/number) or [string](/reference/types/string) over ``radio``.
|
||||
|
||||
|
||||
@ -12,9 +12,9 @@ radio.onDataReceived(() => { });
|
||||
|
||||
### Example
|
||||
|
||||
This program keeps sending numbers that says how fast the micro:bit is
|
||||
This program keeps sending numbers that says how fast the @boardname@ is
|
||||
slowing down or speeding up. It also receives numbers for the same
|
||||
thing from nearby micro:bits. It shows these numbers as a
|
||||
thing from nearby @boardname@s. It shows these numbers as a
|
||||
[bar graph](/reference/led/plot-bar-graph).
|
||||
|
||||
```blocks
|
||||
|
@ -6,8 +6,8 @@ A packet that was received by the radio.
|
||||
|
||||
* `receivedNumber` - The [number](/reference/types/number) that was sent in this packet or `0` if this packet did not contain a number. See [send number](/reference/radio/send-number) and [send value](/reference/radio/send-value)
|
||||
* `receivedString` - The [string](/reference/types/string) that was sent in this packet or the empty string if this packet did not contain a string. See [send string](/reference/radio/send-string) and [send value](/reference/radio/send-value)
|
||||
* `time` - The system time of the micro:bit that sent this packet at the time the packet was sent.
|
||||
* `serial` - The serial number of the micro:bit that sent this packet or `0` if the micro:bit did not include its serial number.
|
||||
* `time` - The system time of the @boardname@ that sent this packet at the time the packet was sent.
|
||||
* `serial` - The serial number of the @boardname@ that sent this packet or `0` if the @boardname@ did not include its serial number.
|
||||
* `signal` - How strong the radio signal is from `255` (weak) to `0` (strong).
|
||||
|
||||
### See also
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
> 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.
|
||||
Receives the next number sent by a @boardname@ in the same ``radio`` group.
|
||||
|
||||
```sig
|
||||
radio.receiveNumber();
|
||||
@ -10,11 +10,11 @@ radio.receiveNumber();
|
||||
|
||||
### Returns
|
||||
|
||||
* the first [number](/reference/types/number) that the micro:bit received. If it did not receive any numbers, this function will return `0`.
|
||||
* the first [number](/reference/types/number) that the @boardname@ received. If it did not receive any numbers, this function will return `0`.
|
||||
|
||||
### Example: Simple number receiver
|
||||
|
||||
This example receives the number broadcasted another micro:bit and shows it
|
||||
This example receives the number broadcasted another @boardname@ and shows it
|
||||
as a bar graph.
|
||||
|
||||
```blocks
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
> Note: This API has been deprecated! Use [on data packet received](/reference/radio/on-data-packet-received) instead.
|
||||
|
||||
Find the next string sent by `radio` from another micro:bit.
|
||||
Find the next string sent by `radio` from another @boardname@.
|
||||
|
||||
```sig
|
||||
radio.receiveString()
|
||||
@ -15,7 +15,7 @@ radio.receiveString()
|
||||
|
||||
### Example: Simple receiver
|
||||
|
||||
Show the string sent by another micro:bit.
|
||||
Show the string sent by another @boardname@.
|
||||
|
||||
```blocks
|
||||
radio.onDataReceived(() => {
|
||||
@ -25,8 +25,8 @@ radio.onDataReceived(() => {
|
||||
|
||||
### Example: Two-way radio
|
||||
|
||||
If you load this program onto two or more micro:bits, you can send a code word from one of them to the others by pressing button `A`.
|
||||
The other micro:bits will receive the code word and then show it.
|
||||
If you load this program onto two or more @boardname@s, you can send a code word from one of them to the others by pressing button `A`.
|
||||
The other @boardname@s will receive the code word and then show it.
|
||||
|
||||
```blocks
|
||||
input.onButtonPressed(Button.A, () => {
|
||||
|
@ -5,7 +5,7 @@
|
||||
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 @boardname@ finds the signal strength by checking how strong it was
|
||||
the last time it ran the
|
||||
[on data packet received](/reference/radio/on-data-packet-received) function. That means
|
||||
it needs to run **receive number** first.
|
||||
@ -21,7 +21,7 @@ how strong the signal is.
|
||||
|
||||
### Simulator
|
||||
|
||||
This function only works on the micro:bit, not in browsers.
|
||||
This function only works on the @boardname@, not in browsers.
|
||||
|
||||
### Example
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Send Number
|
||||
|
||||
Broadcast a [number](/reference/types/number) to other micro:bits connected via ``radio``.
|
||||
Broadcast a [number](/reference/types/number) to other @boardname@s connected via ``radio``.
|
||||
|
||||
```sig
|
||||
radio.sendNumber(0);
|
||||
@ -13,8 +13,8 @@ radio.sendNumber(0);
|
||||
|
||||
### Example: Broadcasting acceleration
|
||||
|
||||
This example broadcasts the value of your micro:bit's ``acceleration``
|
||||
in the `x` direction (left and right) to other micro:bits. This kind
|
||||
This example broadcasts the value of your @boardname@'s ``acceleration``
|
||||
in the `x` direction (left and right) to other @boardname@s. This kind
|
||||
of program might be useful in a model car or model rocket.
|
||||
|
||||
```blocks
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Send String
|
||||
|
||||
Sends a string to other micro:bits in the area connected by radio. The
|
||||
Sends a string to other @boardname@s in the area connected by radio. The
|
||||
maximum string length is 19 characters.
|
||||
|
||||
```sig
|
||||
@ -14,9 +14,9 @@ radio.sendString("Hello!")
|
||||
|
||||
### Example: Two-way radio
|
||||
|
||||
If you load this program onto two or more micro:bits, you can send a
|
||||
If you load this program onto two or more @boardname@s, you can send a
|
||||
code word from one of them to the others by pressing button `A`. The
|
||||
other micro:bits will receive the code word and then show it.
|
||||
other @boardname@s will receive the code word and then show it.
|
||||
|
||||
```blocks
|
||||
input.onButtonPressed(Button.A, () => {
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Send Value
|
||||
|
||||
Send a [string]() and [number]() together by ``radio`` to other micro:bits.
|
||||
Send a [string]() and [number]() together by ``radio`` to other @boardname@s.
|
||||
The maximum [string]() length is 12 characters.
|
||||
|
||||
```sig
|
||||
@ -14,9 +14,9 @@ radio.sendValue("name", 0);
|
||||
|
||||
### Example: Broadcasting acceleration
|
||||
|
||||
This program sends your micro:bit's **acceleration** (amount it is
|
||||
This program sends your @boardname@'s **acceleration** (amount it is
|
||||
speeding up or slowing down) in the `x` direction (left and right) to
|
||||
other micro:bits. This kind of program might be useful in a model car
|
||||
other @boardname@s. This kind of program might be useful in a model car
|
||||
or model rocket.
|
||||
|
||||
```blocks
|
||||
|
@ -1,13 +1,13 @@
|
||||
# Set Group
|
||||
|
||||
Make a program have the group ID you tell it for sending and receiving
|
||||
with ``radio``. A group is like a cable channel (a micro:bit can only
|
||||
with ``radio``. A group is like a cable channel (a @boardname@ can only
|
||||
send or receive in one group at a time). A group ID is like the cable
|
||||
channel number.
|
||||
|
||||
If you do not tell your program which group ID to use with this
|
||||
function, it will figure out its own group ID by itself. If you load
|
||||
the very same program onto two different micro:bits, they will be able
|
||||
the very same program onto two different @boardname@s, they will be able
|
||||
to talk to each other because they will have the same group ID.
|
||||
|
||||
```sig
|
||||
@ -20,7 +20,7 @@ radio.setGroup(0);
|
||||
|
||||
### Simulator
|
||||
|
||||
This function only works on the micro:bit, not in browsers.
|
||||
This function only works on the @boardname@, not in browsers.
|
||||
|
||||
### Example
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Set Transmit Power
|
||||
|
||||
Make the ``radio`` signal of the micro:bit stronger or weaker.
|
||||
Make the ``radio`` signal of the @boardname@ stronger or weaker.
|
||||
It can be as weak as `0` and as strong as `7`.
|
||||
|
||||
The scientific name for the strength of the ``radio`` signal is
|
||||
@ -14,8 +14,8 @@ radio.setTransmitPower(7);
|
||||
|
||||
### Range
|
||||
|
||||
If your micro:bit is sending with a strength of `7`, and you are in
|
||||
an open area without many other computers around, the micro:bit signal
|
||||
If your @boardname@ is sending with a strength of `7`, and you are in
|
||||
an open area without many other computers around, the @boardname@ signal
|
||||
can reach as far as 70 meters (about 230 feet).
|
||||
|
||||
### Parameters
|
||||
@ -25,7 +25,7 @@ means how strong the signal is.
|
||||
|
||||
### Simulator
|
||||
|
||||
This function only works on the micro:bit, not in browsers.
|
||||
This function only works on the @boardname@, not in browsers.
|
||||
|
||||
### Example
|
||||
|
||||
|
@ -19,7 +19,7 @@ The format for received data printed to serial is as follows:
|
||||
### Examples
|
||||
|
||||
When ```radio``` data is received (after pressing the ``A`` button on
|
||||
the second micro:bit), this program sends temperature data to
|
||||
the second @boardname@), this program sends temperature data to
|
||||
serial.
|
||||
|
||||
```blocks
|
||||
|
@ -19,7 +19,7 @@ The format for received data printed to serial is as follows:
|
||||
### Examples
|
||||
|
||||
When ```radio``` data is received (after pressing the ``A`` button on
|
||||
the second micro:bit), this program sends temperature data to
|
||||
the second @boardname@), this program sends temperature data to
|
||||
serial.
|
||||
|
||||
```blocks
|
||||
|
Reference in New Issue
Block a user