Second demo with X-NUCLEO-53L1A1.

Dependencies:   X_NUCLEO_53L1A1 X_NUCLEO_IKS01A3

Files at this revision

API Documentation at this revision

Comitter:
loarri
Date:
Tue Nov 23 09:00:33 2021 +0000
Parent:
4:ae2069fd545c
Child:
6:054c18d427bf
Commit message:
up

Changed in this revision

X_NUCLEO_53L1A1.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/X_NUCLEO_53L1A1.lib	Tue Nov 03 11:42:16 2020 +0000
+++ b/X_NUCLEO_53L1A1.lib	Tue Nov 23 09:00:33 2021 +0000
@@ -1,1 +1,1 @@
-https://os.mbed.com/teams/ST/code/X_NUCLEO_53L1A1/#9e555217be6e
+https://os.mbed.com/teams/ST/code/X_NUCLEO_53L1A1/#820c80ae7752
--- a/main.cpp	Tue Nov 03 11:42:16 2020 +0000
+++ b/main.cpp	Tue Nov 23 09:00:33 2021 +0000
@@ -1,3 +1,9 @@
+/*-----------------------------------------------------------
+
+ Demo usata nel Corso STM32 NUCLEO Mbed OS - Novembre 2021
+
+-----------------------------------------------------------
+*/
 /*
  *  This VL53L1X Expansion board test application performs range measurements
  *  using the onboard embedded centre sensor, and 2 Satellite boards.
@@ -60,7 +66,8 @@
     printf("I2C device created!\r\n");
 
     /* creates the 53L1A1 expansion board singleton obj */
-    board = XNucleo53L1A1::instance(dev_I2C, A2, D9, D2);
+    //board = XNucleo53L1A1::instance(dev_I2C, A2, D9, D2);    /* original code */
+    board = XNucleo53L1A1::instance(dev_I2C, A2, PB_13, PB_14);
     printf("board created!\r\n");
 
     /* init the 53L1A1 expansion board with default values */
@@ -130,16 +137,19 @@
             board->sensor_right->vl53l1x_get_range_status(&ready_right);
             board->sensor_right->vl53l1x_get_distance(&distance_right);
         }
-
+        
         if (board->sensor_centre != NULL) {
             printf("Distance read by centre sensor is : %d\r\n", distance_centre);
         }
+        
         if (board->sensor_left != NULL) {
             printf("Distance read by left satellite sensor is : %d\r\n", distance_left);
         }
+        
         if (board->sensor_right != NULL) {
             printf("Distance read by right satellite sensor is : %d\r\n", distance_right);
         }
+        
     }
 
     return status;