Sample BLE thermometer profile for nRF51-DK with sensing from LM35

Dependencies:   BLE_API mbed nRF51822 X_NUCLEO_IDB0XA1

Fork of BLE_Thermometer by Bluetooth Low Energy

Files at this revision

API Documentation at this revision

Comitter:
gkroussos
Date:
Thu May 31 16:14:49 2018 +0000
Parent:
18:86ccdd5a2bfd
Commit message:
Activated LM35;

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Thu May 31 15:10:15 2018 +0000
+++ b/main.cpp	Thu May 31 16:14:49 2018 +0000
@@ -108,9 +108,10 @@
 
             /* In our case, we simply update the dummy temperature measurement. */
             /*
-            float temperature = ((LM35*3.3)-0.600)*100.0;
+            float currentTemperature = ((LM35*3.3)-0.600)*100.0;
             */
-            currentTemperature += 0.1;
+            //currentTemperature += 0.1;
+            currentTemperature = ((LM35*3.3)-0.600)*100.0;
             thermometerServicePtr->updateTemperature(currentTemperature);
         } else {
             ble.waitForEvent();