Second demo with X-NUCLEO-53L1A1.

Dependencies:   X_NUCLEO_53L1A1 X_NUCLEO_IKS01A3

Revision:
5:7f6149b9cbbe
Parent:
3:d90f22c17d0c
Child:
6:054c18d427bf
--- 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;