Hello World program for this deprecated board, based on older versions of BLE_API (rev1130), X_NUCLEO_IDB0XA1 (rev212) and mbed (rev114) libraries.

Dependencies:   BLE_API X_NUCLEO_IDB0XA1 mbed

Fork of BLE_HeartRate_IDB0XA1 by ST

Files at this revision

API Documentation at this revision

Comitter:
apalmieri
Date:
Wed Oct 05 09:16:58 2016 +0000
Parent:
20:60d60ccf8eea
Commit message:
Minor change (bps values range)

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Fri Sep 16 10:21:57 2016 +0000
+++ b/main.cpp	Wed Oct 05 09:16:58 2016 +0000
@@ -63,7 +63,7 @@
     ble.gap().onDisconnection(disconnectionCallback);
 
     /* Setup primary service. */
-    uint8_t hrmCounter = 100; // init HRM to 100bps
+    uint8_t hrmCounter = 60; // init HRM to 60bps
     HeartRateService hrService(ble, hrmCounter, HeartRateService::LOCATION_FINGER);
 
     /* Setup advertising. */
@@ -85,9 +85,9 @@
             // In our case, we simply update the HRM measurement.
             hrmCounter++;
 
-            //  100 <= HRM bps <=175
-            if (hrmCounter == 175) {
-                hrmCounter = 100;
+            //  60 <= HRM bps <= 100
+            if (hrmCounter == 100) {
+                hrmCounter = 60;
             }
 
             // update bps