@@ -266,21 +266,24 @@ void setup() {
266
266
267
267
// Create VL53L0X top component.
268
268
xshutdown_top = new STMPE1600DigiOut (&DEV_I2C, GPIO_15, (0x42 * 2 ));
269
- sensor_vl53l0x_top = new VL53L0X_X_NUCLEO_53L0A1 (&DEV_I2C, xshutdown_top, A2);
269
+ sensor_vl53l0x_top = new VL53L0X_X_NUCLEO_53L0A1 (&DEV_I2C, xshutdown_top);
270
+ sensor_vl53l0x_top->begin ();
270
271
271
272
// Switch off VL53L0X top component.
272
273
sensor_vl53l0x_top->VL53L0X_Off ();
273
274
274
275
// Create VL53L0X left component.
275
276
xshutdown_left = new STMPE1600DigiOut (&DEV_I2C, GPIO_14, (0x43 * 2 ));
276
- sensor_vl53l0x_left = new VL53L0X_X_NUCLEO_53L0A1 (&DEV_I2C, xshutdown_left, D8);
277
+ sensor_vl53l0x_left = new VL53L0X_X_NUCLEO_53L0A1 (&DEV_I2C, xshutdown_left);
278
+ sensor_vl53l0x_left->begin ();
277
279
278
280
// Switch off VL53L0X left component.
279
281
sensor_vl53l0x_left->VL53L0X_Off ();
280
282
281
283
// Create VL53L0X right component.
282
284
xshutdown_right = new STMPE1600DigiOut (&DEV_I2C, GPIO_15, (0x43 * 2 ));
283
- sensor_vl53l0x_right = new VL53L0X_X_NUCLEO_53L0A1 (&DEV_I2C, xshutdown_right, D2);
285
+ sensor_vl53l0x_right = new VL53L0X_X_NUCLEO_53L0A1 (&DEV_I2C, xshutdown_right);
286
+ sensor_vl53l0x_right->begin ();
284
287
285
288
// Switch off VL53L0X right component.
286
289
sensor_vl53l0x_right->VL53L0X_Off ();
0 commit comments