support for buffer signature (#325)

This commit is contained in:
Peli de Halleux
2016-12-23 08:58:38 -08:00
committed by GitHub
parent 141cb24e3d
commit 2da0cf1178
11 changed files with 145 additions and 5 deletions

View File

@ -18,23 +18,24 @@ Read more at https://lancaster-university.github.io/microbit-docs/ble/eddystone/
## ~
```sig
bluetooth.advertiseUrl("https://pxt.microbit.org/", 7, true);
bluetooth.advertiseUrl("https://pxt.microbit.org/", true);
```
### Parameters
* ``url`` - a [string](/reference/types/string) containing the URL to broadcast, at most 17 characters long, excluding the protocol (eg: ``https://``) which gets encoded as 1 byte.
* ``power`` - a [number](/reference/types/number) representing the power level between 0 (short) and 7 (maximum range).
* ``connectable`` - a [boolean](/reference/type/boolean) indicating whether or not the micro:bit should accept connections.
### Example: Broadcast a secret code
```blocks
bluetooth.advertiseUrl("https://pxt.io?secret=42", 7, true);
bluetooth.advertiseUrl("https://pxt.io?secret=42", true);
```
## See Also
[stop-advertising](/reference/bluetooth/stop-advertising)
[stop-advertising](/reference/bluetooth/stop-advertising), [advertise-uid](/reference/bluetooth/advertise-uid)
```package
bluetooth