Example of hello world for X-NUCLEO-IKS01A3

Dependencies:   X_NUCLEO_IKS01A3

Hello World Demo Application based on sensor expansion board X-NUCLEO-IKS01A3

Main function is to show how to get humidity, temperature, pressure, accelerometer, magnetomer and gyroscope data using the sensor expansion board and send them using UART to a connected PC or Desktop and display it on terminal applications like TeraTerm.

Revision:
3:9f8fadc965fc
Parent:
0:535249dc4bf5
Child:
5:7c883cce2bc4
--- a/main.cpp	Fri Apr 12 13:34:50 2019 +0000
+++ b/main.cpp	Fri May 24 11:20:13 2019 +0000
@@ -135,16 +135,16 @@
     printf("---\r\n");
 
     magnetometer->get_m_axes(axes);
-    printf("LIS2MDL [mag/mgauss]:  %6ld, %6ld, %6ld\r\n", axes[0], axes[1], axes[2]);
+    printf("LIS2MDL [mag/mgauss]:  %6d, %6d, %6d\r\n", axes[0], axes[1], axes[2]);
     
     accelerometer->get_x_axes(axes);
-    printf("LIS2DW12 [acc/mg]:  %6ld, %6ld, %6ld\r\n", axes[0], axes[1], axes[2]);
+    printf("LIS2DW12 [acc/mg]:  %6d, %6d, %6d\r\n", axes[0], axes[1], axes[2]);
 
     acc_gyro->get_x_axes(axes);
-    printf("LSM6DSO [acc/mg]:      %6ld, %6ld, %6ld\r\n", axes[0], axes[1], axes[2]);
+    printf("LSM6DSO [acc/mg]:      %6d, %6d, %6d\r\n", axes[0], axes[1], axes[2]);
 
     acc_gyro->get_g_axes(axes);
-    printf("LSM6DSO [gyro/mdps]:   %6ld, %6ld, %6ld\r\n", axes[0], axes[1], axes[2]);
+    printf("LSM6DSO [gyro/mdps]:   %6d, %6d, %6d\r\n", axes[0], axes[1], axes[2]);
 
     wait(1.5);
   }