Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: HTS221 LIS3MDL LPS22HB LSM303AGR LSM6DSL VL53L0X
Supports NUCLEO+X-NUCLEO-IKS01A2 , STEVAL-STLKT01V1 (a.k.a. SensorTile) and B-L475E-IOT01A boards.
Revision 1:0f7838527fef, committed 2017-09-08
- Comitter:
- nikapov
- Date:
- Fri Sep 08 12:22:48 2017 +0000
- Parent:
- 0:6a97487a0ab3
- Child:
- 2:4d4fa82dbc59
- Commit message:
- Revert to mbed classic. Cosmetic changes.
Changed in this revision
--- a/main.cpp Thu Sep 07 12:31:15 2017 +0000
+++ b/main.cpp Fri Sep 08 12:22:48 2017 +0000
@@ -127,7 +127,8 @@
acc_gyro.enable_x();
acc_gyro.enable_g();
- printf("\r\n--- Starting new run ---\r\n");
+ printf("\033[2J\033[20A");
+ printf ("\r\n--- Starting new run ---\r\n\r\n");
hum_temp.read_id(&id);
printf("HTS221 humidity & temperature = 0x%X\r\n", id);
@@ -135,12 +136,14 @@
printf("LPS22HB pressure & temperature = 0x%X\r\n", id);
magnetometer.read_id(&id);
#ifdef TARGET_DISCO_L475VG_IOT01A
- printf("LIS3MDL magnetometer = 0x%X\r\n", id);
+ printf("LIS3MDL magnetometer = 0x%X\r\n", id);
#else // X-NUCLEO-IKS01A2
printf("LSM303AGR magnetometer = 0x%X\r\n", id);
#endif
acc_gyro.read_id(&id);
printf("LSM6DSL accelerometer & gyroscope = 0x%X\r\n", id);
+
+ printf("\n\r--- Reading sensor values ---\n\r"); ;
while(1) {
printf("\r\n");
@@ -157,17 +160,18 @@
magnetometer.get_m_axes(axes);
#ifdef TARGET_DISCO_L475VG_IOT01A
- printf("LIS3MDL [mag/mgauss]: %6ld, %6ld, %6ld\r\n", axes[0], axes[1], axes[2]);
+ printf("LIS3MDL [mag/mgauss]: %6ld, %6ld, %6ld\r\n", axes[0], axes[1], axes[2]);
#else // X-NUCLEO-IKS01A2
printf("LSM303AGR [mag/mgauss]: %6ld, %6ld, %6ld\r\n", axes[0], axes[1], axes[2]);
#endif
acc_gyro.get_x_axes(axes);
- printf("LSM6DSL [acc/mg]: %6ld, %6ld, %6ld\r\n", axes[0], axes[1], axes[2]);
+ printf("LSM6DSL [acc/mg]: %6ld, %6ld, %6ld\r\n", axes[0], axes[1], axes[2]);
acc_gyro.get_g_axes(axes);
- printf("LSM6DSL [gyro/mdps]: %6ld, %6ld, %6ld\r\n", axes[0], axes[1], axes[2]);
+ printf("LSM6DSL [gyro/mdps]: %6ld, %6ld, %6ld\r\n", axes[0], axes[1], axes[2]);
- wait(2);
+ printf("\033[7A");
+ wait(1);
}
}
--- a/mbed-os.lib Thu Sep 07 12:31:15 2017 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -https://github.com/ARMmbed/mbed-os/#98ba8acb83cfc65f30a8a0771a27c71443ab093a
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Sep 08 12:22:48 2017 +0000 @@ -0,0 +1,1 @@ +https://mbed.org/users/mbed_official/code/mbed/builds/a330f0fddbec \ No newline at end of file