Dreamforce 2015 BLE-based mDS HeartRate Monitor Endpoint
Dependencies: GroveEarbudSensor mbed mbedConnectorInterface mbedEndpointNetwork_BLE
Diff: main.cpp
- Revision:
- 2:9d7c4bad311e
- Parent:
- 1:3ad5d55e1cc7
- Child:
- 3:b0eb973cddda
--- a/main.cpp Wed Mar 11 20:27:40 2015 +0000 +++ b/main.cpp Thu Mar 12 17:14:29 2015 +0000 @@ -33,10 +33,23 @@ // Logging facility Logger logger(&pc); +// Which Nordic board are we using? +#define NORDIC_BOARD 1 // 1 - DK, 2 - Dongle, 3 - mkit + +#if NORDIC_BOARD == 1 + #define NORDIC_MODEL "nRF51822-DK" +#endif +#if NORDIC_BOARD == 2 + #define NORDIC_MODEL "nRF51822-DONGLE" +#endif +#if NORDIC_BOARD == 3 + #define NORDIC_MODEL "nRF51822-MKIT" +#endif + // Static Resources #include "StaticResource.h" StaticResource mfg(&logger,"dev/mfg","Nordic Semi"); -StaticResource model(&logger,"dev/mdl","nRF51-DK"); +StaticResource model(&logger,"dev/mdl",NORDIC_MODEL); // // Dynamic Resource Note: @@ -63,7 +76,7 @@ //int my_nsp_coap_port = 26395; // www.ansonworks.com:27164 // Customization Example: My custom NSP IPv6 address and NSP CoAP port -uint8_t my_nsp_address[NSP_IP_ADDRESS_LENGTH] = {192,168,1,150}; +uint8_t my_nsp_address[NSP_IP_ADDRESS_LENGTH] = {10,1,0,26}; int my_nsp_coap_port = 5683; // called from the Endpoint::start() below to create resources and the endpoint internals...