updates

Dependencies:   microbit2

Fork of eddystone_test by Martin Woolley

Revision:
2:2e790f118a62
Parent:
0:580a61fd96a1
--- a/main.cpp	Wed Feb 08 07:52:57 2017 +0000
+++ b/main.cpp	Mon Jul 17 20:50:07 2017 +0000
@@ -2,7 +2,18 @@
 
 MicroBit uBit;
 
-char URL[] = "https://goo.gl/TlUTF7";
+char URL[] = "https://goo.gl/QJpaKk";
+
+// lvl : Pwr@ 1m : Pwr@ 0m
+//  0  :   -90   :   -49
+//  1  :   -78   :   -37
+//  2  :   -74   :   -33
+//  3  :   -69   :   -28 
+//  4  :   -66   :   -25 
+//  5  :   -61   :   -20 
+//  6  :   -56   :   -15 
+//  7  :   -51   :   -10 
+
 const int8_t CALIBRATED_POWERS[] = {-49, -37, -33, -28, -25, -20, -15, -10};
 
 uint8_t advertising = 0;
@@ -27,6 +38,7 @@
         return;
     }
     startAdvertising();
+
 }
 
 void onButtonB(MicroBitEvent)
@@ -39,13 +51,14 @@
 
 int main()
 {
-    // Initialise the micro:bit runtime.
+    //  Initialise the micro:bit at runtime  
     uBit.init();
 
     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();
+
+    uBit.bleManager.advertise();  //First Advertisment, adv name only
     
     release_fiber();
 }