temp sensor for the expansion board with a time stamp in epoch, variables to change are offset, and the wait(x). x should be in seconds

Dependencies:   mbed X_NUCLEO_IKS01A2

Files at this revision

API Documentation at this revision

Comitter:
evanjp05
Date:
Wed Dec 23 00:10:37 2020 +0000
Parent:
18:04cf351e841f
Commit message:
vars moved ;

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Tue Dec 22 23:56:27 2020 +0000
+++ b/main.cpp	Wed Dec 23 00:10:37 2020 +0000
@@ -49,6 +49,8 @@
 //static LSM303AGRMagSensor *magnetometer = mems_expansion_board->magnetometer;
 static HTS221Sensor *hum_temp = mems_expansion_board->ht_sensor;
 static LPS22HBSensor *press_temp = mems_expansion_board->pt_sensor;
+int offset = 5;
+float F;
 
 
 /* Helper function for printing floats & doubles */
@@ -89,9 +91,9 @@
 
 /* Simple main function */
 int main() {
-  float F;
+
   uint8_t id;
-  int offset = 5; //in order to calibrate the temp sensor
+   //in order to calibrate the temp sensor
   float value1, value2;
   //char buffer1[32], buffer2[32];
   //int32_t axes[3];
@@ -129,8 +131,7 @@
     //printf("%f, ", t.read());
     printf(" %7s", print_double(buffer1, F));
     //printf(" %s", buffer);
-    
-    wait(1);
-  //  wait(1200);
+
+   wait(1200);
   }
 }