I2C to BLE nano with notifications to pi using original mbed os code

Dependencies:   BLE_API mbed nRF51822

Fork of BLE_notifications by Nicholas Kosarek

Revision:
12:e38bb61023ed
Parent:
11:fd1cf9dbf3a4
Child:
13:d4448d59ab69
--- a/main.cpp	Tue Apr 18 17:05:04 2017 +0000
+++ b/main.cpp	Tue Apr 18 21:11:05 2017 +0000
@@ -87,7 +87,6 @@
     ble.gap().setAdvertisingInterval(1000); /* 1000ms. */
     pc.printf("start advertising now \r\n");
     ble.gap().startAdvertising();
-
 }
 
 int main(void)
@@ -98,7 +97,7 @@
     BLE &ble = BLE::Instance();
     ble.init(bleInitComplete);
     
-    pc.printf("entereing spin loop\r\n");
+    pc.printf("entering spin loop\r\n");
     /* SpinWait for initialization to complete. This is necessary because the
      * BLE object is used in the main loop below. */
     while (ble.hasInitialized()  == false) { /* spin loop */ }
@@ -110,10 +109,10 @@
             pc.printf("sending Notification\r\n");
             buttonServicePtr->updateButtonState(counter);
             counter++;
-            //sleep(1000);
         } else {
             //
         }
-        ble.waitForEvent();
+        //ble.waitForEvent();
+        sleep(1000);
     }
 }