Read board sensors (temperature, humidity, pressure, gyroscope, accelerometer, magnetometer) using ST BSP drivers. This example is superceded with the HelloWorld_ST_Sensors example.

Dependencies:   BSP_B-L475E-IOT01

Information

This example is superceded with the HelloWorld_ST_Sensors example.

Import programHelloWorld_ST_Sensors

Simple application to test ST motion and environmental MEMS sensors. Supports NUCLEO+X-NUCLEO-IKS01A2 , STEVAL-STLKT01V1 (a.k.a. SensorTile) and B-L475E-IOT01A boards.

Revision:
12:688020afdae7
Parent:
11:986c1f5db128
--- a/main.cpp	Fri Jul 07 07:08:37 2017 +0000
+++ b/main.cpp	Tue Sep 24 15:42:22 2019 +0200
@@ -16,6 +16,8 @@
     int16_t pDataXYZ[3] = {0};
     float pGyroDataXYZ[3] = {0};
 
+    printf("Start sensor init\n");
+
     BSP_TSENSOR_Init();
     BSP_HSENSOR_Init();
     BSP_PSENSOR_Init();
@@ -25,6 +27,7 @@
     BSP_ACCELERO_Init();
 
     while(1) {
+        printf("\nNew loop, LED1 should blink during sensor read\n");
 
         led = 1;
 
@@ -39,7 +42,7 @@
 
         led = 0;
 
-        wait(1);
+        ThisThread::sleep_for(1000);
 
         led = 1;
 
@@ -60,7 +63,7 @@
 
         led = 0;
 
-        wait(1);
+        ThisThread::sleep_for(1000);
 
     }
 }