2019-12-02 05:58:26 +01:00
# received Signal Strength
2016-06-08 20:21:58 +02:00
2019-12-02 05:58:26 +01:00
Find how strong the radio signal is.
2016-10-25 01:30:21 +02:00
2019-12-02 05:58:26 +01:00
```sig
radio.receivedSignalStrength();
```
2022-08-10 18:36:19 +02:00
### ~ hint
2019-12-02 05:58:26 +01:00
2022-08-10 18:36:19 +02:00
#### Deprecated
2019-12-02 05:58:26 +01:00
This API has been deprecated! Use [received packet ](/reference/radio/received-packet ) instead.
2022-08-10 18:36:19 +02:00
### ~
2019-12-02 05:58:26 +01:00
2022-08-10 18:36:19 +02:00
Find how strong the ``radio`` signal is, from `-128` to `-28` .
(`-128` means a weak signal and `-28` means a strong one.)
2016-06-08 20:21:58 +02:00
2016-11-02 01:44:37 +01:00
The @boardname @ finds the signal strength by checking how strong it was
2016-06-08 20:21:58 +02:00
the last time it ran the
2019-12-02 05:58:26 +01:00
[on received number ](/reference/radio/on-received-number ) function. That means
2016-06-08 20:21:58 +02:00
it needs to run **receive number** first.
2019-12-02 05:58:26 +01:00
## Returns
2022-08-10 18:36:19 +02:00
* a [number ](/types/number ) between `-128` and `-28` that means
2016-06-08 20:21:58 +02:00
how strong the signal is.
2022-08-10 18:36:19 +02:00
### ~ hint
#### Signal strength and board version
Measurement of the received signal strength is dependent on what version of @boardname @ you have. The @boardname @ boards prior to v2 can typically measure a signal strength up to `-42` dBm. Now, v2 boards will measure a signal strength up to `-28` dBm (typical).
### ~
2019-12-02 05:58:26 +01:00
## Simulator
2016-06-08 20:21:58 +02:00
2016-11-02 01:44:37 +01:00
This function only works on the @boardname @, not in browsers.
2016-06-08 20:21:58 +02:00
2019-12-02 05:58:26 +01:00
## Example
2016-06-08 20:21:58 +02:00
This example shows how strong the radio signal of the
2016-06-15 13:55:19 +02:00
[light level sender example ](/reference/radio/send-number ) is.
2016-06-08 20:21:58 +02:00
```blocks
let x = 0;
radio.setGroup(99);
basic.forever(() => {
x = radio.receiveNumber();
basic.showNumber(radio.receivedSignalStrength());
});
```
2019-12-02 05:58:26 +01:00
## See also
2016-06-08 20:21:58 +02:00
2022-08-10 18:36:19 +02:00
[on received number ](/reference/radio/on-received-number ), [send number ](/reference/radio/send-number ),
[on data received ](/reference/radio/on-data-received ), [received packet ](/reference/received-packet )
2016-08-09 17:28:08 +02:00
```package
2016-10-23 06:29:31 +02:00
radio
2016-08-09 17:28:08 +02:00
```