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: X_NUCLEO_53L1A1
Diff: main.cpp
- Revision:
- 5:a7c10f0a062f
- Parent:
- 3:a3a863902994
--- a/main.cpp Thu Oct 29 16:34:46 2020 +0000
+++ b/main.cpp Mon Nov 02 17:20:42 2020 +0000
@@ -27,7 +27,7 @@
#include "mbed.h"
#include "XNucleo53L1A1.h"
-#include "vl53L1x_I2c.h"
+#include "VL53L1X_I2C.h"
#define VL53L1_I2C_SDA D14
#define VL53L1_I2C_SCL D15
@@ -51,7 +51,7 @@
printf("Hello world!\r\n");
- vl53L1X_DevI2C *dev_I2C = new vl53L1X_DevI2C(VL53L1_I2C_SDA, VL53L1_I2C_SCL);
+ VL53L1X_DevI2C *dev_I2C = new VL53L1X_DevI2C(VL53L1_I2C_SDA, VL53L1_I2C_SCL);
printf("I2C device created!\r\n");
@@ -70,7 +70,7 @@
/* Start ranging on the centre sensor */
if (board->sensor_centre != NULL) {
- status = board->sensor_centre->VL53L1X_StartRanging();
+ status = board->sensor_centre->vl53l1x_start_ranging();
if (status != 0) {
printf("Centre sensor failed to start ranging!\r\n");
return status;
@@ -88,11 +88,11 @@
break;
}
if (board->sensor_centre != NULL) {
- board->sensor_centre->VL53L1X_CheckForDataReady(&ready_centre);
+ board->sensor_centre->vl53l1x_check_for_data_ready(&ready_centre);
}
if (ready_centre) {
- board->sensor_centre->VL53L1X_GetRangeStatus(&ready_centre);
- board->sensor_centre->VL53L1X_GetDistance(&distance_centre);
+ board->sensor_centre->vl53l1x_get_range_status(&ready_centre);
+ board->sensor_centre->vl53l1x_get_distance(&distance_centre);
}
if (board->sensor_centre != NULL) {