@ -4,7 +4,7 @@ Advertises a URL via the Eddystone protocol over Bluetooth.
|
||||
|
||||
## ~hint
|
||||
|
||||
### Eddystone
|
||||
## Eddystone
|
||||
|
||||
Bluetooth beacons are used to indicate proximity to a place or object of interest.
|
||||
Beacons use Bluetooth advertising to broadcast a small amount of data,
|
||||
@ -21,13 +21,13 @@ Read more at https://lancaster-university.github.io/microbit-docs/ble/eddystone/
|
||||
bluetooth.advertiseUrl("https://makecode.microbit.org/", 7, true);
|
||||
```
|
||||
|
||||
### Parameters
|
||||
## Parameters
|
||||
|
||||
* ``url`` - a [string](/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](/types/number) representing the power level between 0 (short) and 7 (maximum range).
|
||||
* ``connectable`` - a [boolean](/blocks/logic/boolean) indicating whether or not the @boardname@ should accept connections.
|
||||
|
||||
### Example: Broadcast a secret code
|
||||
## Example: Broadcast a secret code
|
||||
|
||||
```blocks
|
||||
bluetooth.advertiseUrl("https://pxt.io?secret=42", 7, true);
|
||||
|
Reference in New Issue
Block a user