VL53L3CX ranging example application, using X-Nucleo-53L3A2 expansion shield and polling, on MbedOS v6.x
Dependencies: X_NUCLEO_53L3A2
Diff: main.cpp
- Revision:
- 8:4f47fb835574
- Parent:
- 6:15c4dfc55014
- Child:
- 10:6145f8f6527c
--- a/main.cpp Wed Nov 04 14:17:38 2020 +0000 +++ b/main.cpp Tue Nov 10 08:36:02 2020 +0000 @@ -24,7 +24,11 @@ #define I2C_SCL D15 static XNucleo53L3A2 *board=NULL; -Serial pc(SERIAL_TX, SERIAL_RX); +#if (MBED_VERSION > 60300) + UnbufferedSerial pc(SERIAL_TX, SERIAL_RX); +#else + Serial pc(SERIAL_TX, SERIAL_RX); +#endif @@ -41,7 +45,7 @@ int main() { int status; - VL53LX * Sensor; + VL53L3 * Sensor; uint16_t wordData; static VL53LX_MultiRangingData_t RangingData; @@ -129,3 +133,4 @@ // status = Sensor->VL53LX_StopMeasurement(); } +