pxt-calliope/docs/reference/devices/on-notified.md
Sam El-Husseini e3975e65e5 pxt-microbit Accessibility PR (#529)
* Accessibility changes
2017-09-07 13:42:08 -07:00

1000 B

On Signal Strength Changed

Register code to run when the signal strength of the paired device changes.

~hint

For another device like a smartphone to use any of the Bluetooth "services" which the @boardname@ has, it must first be paired with the @boardname@. Once paired, the other device may connect to the @boardname@ and exchange data relating to many of the @boardname@'s features.

~

devices.onNotified(MesDeviceInfo.IncomingCall, () => {})

Parameters

  • body: code to run when the signal strength changes.

Examples

Display the signal strength on screen:

devices.onNotified(MesDeviceInfo.IncomingCall, () => {
    basic.showString("RING RING")
})

See Also

tell remote control to, raise alert to, signal strength

devices