A sample program to control one VL53L1 ToF sensor in multizone mode using polling to find out if a measurement is available. Mbed V6.3 but will run any MBed version by dropping replacing this one. Maint6 release.
Dependencies: X_NUCLEO_53L1A2
Diff: main.cpp
- Revision:
- 7:b5a4ad8ba844
- Parent:
- 6:bc6ac1e294f4
- Child:
- 8:8f6490937346
--- a/main.cpp Fri Apr 30 10:58:19 2021 +0000 +++ b/main.cpp Fri Apr 30 14:16:46 2021 +0000 @@ -4,7 +4,7 @@ * Measured ranges are ouput on the Serial Port, running at 115200 baud. * * - * This is designed to work with MBed V2 ,MBed V5 and MBed V6. + * This is designed to work with MBed v2, & MBedOS v5 / v6. * * * The Reset button can be used to restart the program. @@ -26,7 +26,7 @@ static XNucleo53L1A2 *board=NULL; #if (MBED_VERSION > 60300) - UnbufferedSerial pc(SERIAL_TX, SERIAL_RX); + UnbufferedSerial pc(USBTX, USBRX); extern "C" void wait_ms(int ms); #else Serial pc(SERIAL_TX, SERIAL_RX);