Complete sensor demo.

Dependencies:   modem_ref_helper CRC X_NUCLEO_IKS01A1 DebouncedInterrupt

Revision:
15:1271f3566b98
Parent:
6:c17f7cbdeb1a
--- a/sensors.cpp	Thu Oct 11 15:15:30 2018 +0000
+++ b/sensors.cpp	Fri Aug 02 16:39:28 2019 +0000
@@ -154,7 +154,7 @@
     /* Check presence */
     if(error)
     {
-        EPRINT("LSM303C_MAG Not detected!\r\n");
+        PRINT("LSM303C_MAG Not detected!\r\n");
         delete magnetometer;
         magnetometer = NULL;
         return false;
@@ -162,7 +162,7 @@
     
     if (id != I_AM_LSM303C_MAG)
     {
-        EPRINT("This is not a LSM303C_MAG (0x02X != 0x02X)\r\n", id, I_AM_LSM303C_MAG);
+        PRINT("This is not a LSM303C_MAG (0x02X != 0x02X)\r\n", id, I_AM_LSM303C_MAG);
         delete magnetometer;
         magnetometer = NULL;
         return false;
@@ -196,7 +196,7 @@
     /* Check presence */
     if(error)
     {
-        EPRINT("LSM303C_ACC Not detected!\r\n");
+        PRINT("LSM303C_ACC Not detected!\r\n");
         delete accelerometer;
         accelerometer = NULL;
         return false;
@@ -204,7 +204,7 @@
     
     if (id != I_AM_LSM303C_ACC)
     {
-        EPRINT("This is not a LSM303C_ACC (0x02X != 0x02X)\r\n", id, I_AM_LSM303C_ACC);
+        PRINT("This is not a LSM303C_ACC (0x02X != 0x02X)\r\n", id, I_AM_LSM303C_ACC);
         delete accelerometer;
         accelerometer = NULL;
         return false;
@@ -339,7 +339,7 @@
 #elif (_LIGHT_EN_ == 1) && defined(SENSOR_LIGHT_MEAS) && defined(SENSOR_LIGHT_EN)
     float tmp;
     g_light_en_l = 0;
-    Thread::wait(10);
+    ThisThread::sleep_for(10);
     tmp = g_light_meas;
     g_light_en_l = 1;
     buf[0] = (int32_t)(tmp*1000);