radio.setFrequencyBand support (#2495)

* setfrequencyband support

* revert line change

* add bounds check
This commit is contained in:
Peli de Halleux
2019-10-25 10:21:34 -07:00
committed by GitHub
parent 4382868d5f
commit 7e18be3c9b
6 changed files with 75 additions and 0 deletions

View File

@ -0,0 +1,34 @@
# set Frequency Band
Change the transmission and reception band of the radio to the given channel. Default is 7.
```sig
radio.setFrequencyBand(50);
```
## Parameters
* ``band`` is a [number](/types/number) between ``0`` and ``83``. Each step is 1MHz wide, based at 2400MHz.
## Simulator
This function only works on the @boardname@, not in browsers.
## Example
This program makes the ``radio`` use frequency band 50.
```blocks
radio.setFrequencyBand(50)
```
## See also
[received packet](/reference/radio/received-packet),
[send number](/reference/radio/send-number),
[send value](/reference/radio/send-value),
[send string](/reference/radio/send-string)
```package
radio
```