Locator beacon firmware

Dependencies:   BLE_API mbed nRF51822

Fork of WeatherStation by Weather man

Revision:
7:8fa805941074
Parent:
6:dc269cf4f951
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/_LampService.h	Sat Apr 29 15:02:20 2017 +0000
@@ -0,0 +1,20 @@
+#include "ble/BLE.h"
+
+class LampService {
+public:
+    typedef uint8_t  LightLevel_t;
+    WriteOnlyGattCharacteristic<LightLevel_t> lightLevelCharacteristic;
+    
+        LampService(BLE& _ble) :
+            ble(_ble),
+            lightLevelCharacteristic(0x2A58, &lightLevel) 
+        {            
+            GattCharacteristic *charTable[] = { &lightLevelCharacteristic };
+            GattService lampService(0x2600, charTable, sizeof(charTable) / sizeof(GattCharacteristic *));
+            ble.gattServer().addService(lampService);
+        }
+private:
+    BLE& ble;
+    
+    LightLevel_t lightLevel;
+};
\ No newline at end of file