Eddystone beacons are a cornerstone of The Physical Web. Using the https://pxt.microbit.org editor, you can easily turn your micro:bit into a beacon.
The CodeThe block to launch a beacon is located in the bluetooth package. Once you've add that package to your project, simply drag the bluetooth advertise url block to the on start block. We also turn on the center LED as a visual indicator that the micro:bit is on.
You can also switch to the JavaScript mode and type in the code directly.
bluetooth.advertiseUrl("https://makecode.com", 7, false)
led.plot(2, 2)
You can also read about the details of the Eddystone support implementation in the Lancaster DAL.
Tweaking the connection settingsBy default, the micro:bit is configured to require pairing. Go to the Project Settings and enable the Unsecure connection mode for the beacon.
Flash your micro:bit and it'll be happilly beaming URLs.
Comments