Joan BLE Dimmer

Dependencies:   BLE_API mbed nRF51822

Fork of BLE_LED_Controller by UCL IoT

Revision:
12:36a9f01cfa0a
Parent:
10:633cec718bf4
Child:
13:291a8f177400
--- a/main.cpp	Tue Dec 09 08:55:59 2014 +0000
+++ b/main.cpp	Wed Dec 17 19:46:22 2014 +0000
@@ -49,16 +49,17 @@
     }
 }
 
+/* Periodic Ticker callback */
 void periodicCallback(void)
 {
-    led1 = !led1;
+    led1 = !led1;                             // Toggle LED 1
 }
 
 int main(void)
 {
     led1 = 1;
-    Ticker ticker;
-    ticker.attach(periodicCallback, 1);
+    Ticker ticker;                            // Create period timer
+    ticker.attach(periodicCallback, 1);       // Attach ticker callback function with a period of 1 second
 
     DEBUG("Initialising the nRF51822\n\r");
     ble.init();