Dreamforce 2015 BLE-based mDS HeartRate Monitor Endpoint

Dependencies:   GroveEarbudSensor mbed mbedConnectorInterface mbedEndpointNetwork_BLE

Revision:
45:425c86379f12
Parent:
44:6171d54fed45
Child:
47:5e57fdac6765
diff -r 6171d54fed45 -r 425c86379f12 main.cpp
--- a/main.cpp	Mon Jul 27 03:05:35 2015 +0000
+++ b/main.cpp	Mon Aug 24 05:33:25 2015 +0000
@@ -69,11 +69,16 @@
 #include "LocationResource.h"
 LocationResource location(&logger,"999/0/1234",true); // observable
 
+// Light Resource
+#include "LightResource.h"
+LightResource light(&logger,"311/0/5850");
+
 // My NSP Domain
-#define MY_NSP_DOMAIN                           "domain" 
+#define MY_NSP_DOMAIN                           "dfbridge5" 
 
 // Customization Example: My custom NSP IPv4 address and NSP CoAP port 
-uint8_t my_nsp_address[NSP_IP_ADDRESS_LENGTH] = {23,99,29,171};       // connector (api.connector.mbed.org)
+//uint8_t my_nsp_address[NSP_IP_ADDRESS_LENGTH] = {23,99,29,171};       // connector (api.connector.mbed.org)
+uint8_t my_nsp_address[NSP_IP_ADDRESS_LENGTH] = {129,41,134,39};     // bluemix vm v2.4
 int my_nsp_coap_port                          = 5683;
 
 // called from the Endpoint::start() below to create resources and the endpoint internals...
@@ -97,8 +102,9 @@
                  .addResource(&model)
                  
                  // add the heartrate resource
-                 .addResource(&hr)                    // Resource implements its own observationing...
-                 .addResource(&location,22000)        // observe every 22 seconds
+                 .addResource(&light)
+                 .addResource(&hr)                   // Resource implements its own observationing...
+                 .addResource(&location,9000)        // observe every 9 seconds
                                       
                  // finalize the configuration...
                  .build();