Dreamforce 2015 BLE-based mDS HeartRate Monitor Endpoint

Dependencies:   GroveEarbudSensor mbed mbedConnectorInterface mbedEndpointNetwork_BLE

Revision:
47:5e57fdac6765
Parent:
45:425c86379f12
Child:
48:7f6d4f9cadd0
--- a/main.cpp	Thu Aug 27 18:22:39 2015 +0000
+++ b/main.cpp	Sun Aug 30 05:39:19 2015 +0000
@@ -26,40 +26,10 @@
 // mbed Network Endpoint 
 #include "mbedEndpointNetwork.h"
 
-// Only Nordic boards are supported...
-#ifdef TARGET_NRF51_DK
-    #define NORDIC_MODEL        "nRF51822-DK"
-    #define MY_ENDPOINT_NAME    "mbed-ble-hrm-dk"
-    #define NORDIC_SDA          SDA
-    #define NORDIC_SCL          SCL   
-#endif
-#ifdef TARGET_NRF51_DONGLE
-    #define NORDIC_MODEL        "nRF51822-DONGLE"
-    #define MY_ENDPOINT_NAME    "mbed-ble-hrm-dongle"
-    #define NORDIC_SDA          P0_20
-    #define NORDIC_SCL          P0_19
-#endif
-#ifdef TARGET_NRF51_MKIT
-    #define NORDIC_MODEL        "nRF51822-MKIT"
-    #define MY_ENDPOINT_NAME    "mbed-ble-hrm-mkit"
-    #define NORDIC_SDA          P0_22
-    #define NORDIC_SCL          P0_20
-#endif
-
 // Static Resources
 #include "StaticResource.h"
 StaticResource mfg(&logger,"dev/mfg","Nordic Semi");
-StaticResource model(&logger,"dev/mdl",NORDIC_MODEL);
-
-//
-// Dynamic Resource Note:
-//
-//  mbedConnectorInterface supports up to IPT_MAX_ENTRIES 
-//  (currently 5) independent dynamic resources.
-//
-//  You can increase this (at the cost of memory) in 
-//  mbedConnectorinterface.h
-//
+StaticResource model(&logger,"dev/mdl","nRF51822");
 
 // Heartrate Resource
 #include "HeartrateResource.h"
@@ -69,15 +39,17 @@
 #include "LocationResource.h"
 LocationResource location(&logger,"999/0/1234",true); // observable
 
-// Light Resource
+// LED Light Resource
 #include "LightResource.h"
 LightResource light(&logger,"311/0/5850");
 
+// My Endpoint Name
+#define MY_ENDPOINT_NAME                        "mbed-ble-hrm-XX"       // replace "XX" with your number
+
 // My NSP Domain
-#define MY_NSP_DOMAIN                           "dfbridge5" 
+#define MY_NSP_DOMAIN                           "dfbridgeXX"            // replace "XX" with your number
 
 // 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] = {129,41,134,39};     // bluemix vm v2.4
 int my_nsp_coap_port                          = 5683;