This repository is for Bluetooth Asia 2018 developer training, beacon session.
Fork of BluetoothAsiaBeaconClass by
Diff: beacon_src.txt
- Revision:
- 24:bfc7acc13cb4
- Parent:
- 22:4f919611ff42
--- a/beacon_src.txt Mon May 07 23:53:26 2018 +0000 +++ b/beacon_src.txt Thu May 17 07:32:41 2018 +0000 @@ -1,8 +1,7 @@ - #include "MicroBit.h" - + MicroBit uBit; - + char URL[] = "http://www.bluetooth.com"; // lvl : Pwr@ 1m : Pwr@ 0m @@ -48,17 +47,23 @@ } stopAdvertising(); } - + + + int main() { // Initialise the micro:bit runtime. uBit.init(); + uBit.bleManager.setTransmitPower(tx_power_level); + uBit.bleManager.advertise(); + uBit.display.scroll("ON"); uBit.messageBus.listen(MICROBIT_ID_BUTTON_A, MICROBIT_BUTTON_EVT_CLICK, onButtonA); uBit.messageBus.listen(MICROBIT_ID_BUTTON_B, MICROBIT_BUTTON_EVT_CLICK, onButtonB); - startAdvertising(); + //startAdvertising(); release_fiber(); + } - + \ No newline at end of file