check program for VL53L0X_simple library

Dependencies:   VL53L0X_simple TextLCD

Please refer below page.
/users/kenjiArai/notebook/vl53l0x-tof-sensor/

Files at this revision

API Documentation at this revision

Comitter:
kenjiArai
Date:
Wed Feb 26 09:37:49 2020 +0000
Parent:
3:1be17b18b200
Commit message:
countermesure for XSHUT = NC; https://forums.mbed.com/t/nc-pin-assign-causes-hardfault/7379/2

Changed in this revision

VL53L0X_simple.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/VL53L0X_simple.lib	Mon Feb 24 11:22:18 2020 +0000
+++ b/VL53L0X_simple.lib	Wed Feb 26 09:37:49 2020 +0000
@@ -1,1 +1,1 @@
-https://os.mbed.com/users/kenjiArai/code/VL53L0X_simple/#b9907dc1e9f9
+https://os.mbed.com/users/kenjiArai/code/VL53L0X_simple/#c9181a97a64f
--- a/main.cpp	Mon Feb 24 11:22:18 2020 +0000
+++ b/main.cpp	Wed Feb 26 09:37:49 2020 +0000
@@ -26,7 +26,7 @@
  *  https://os.mbed.com/users/kenjiArai/
  *      Created:    January   21st, 2018
  *      Revised:    Feburary   6th, 2018 (with updated VL53L0X_simple library)
- *      Revised:    Feburary  24th, 2020 only run on mbed-os5.15.1
+ *      Revised:    Feburary  26th, 2020 only run on mbed-os5.15.1
  */
 
 //  Include --------------------------------------------------------------------
@@ -54,7 +54,13 @@
 //I2C         i2c(P0_30, P0_7);     // only for TY51822r3
 //I2C         i2c(I2C_SDA, I2C_SCL);    // standard
 I2C         i2c(D14, D15);
-VL53L0X     sensor(i2c, D8);        // XSHUT = D8 (or NC)
+#if USE_XSHUT
+VL53L0X     sensor(i2c, D8);
+#else
+VL53L0X     sensor(i2c, NC);
+//VL53L0X     sensor(I2C_SDA, I2C_SCL, NC);
+//VL53L0X     sensor(D14, D15, NC);
+#endif
 #if USE_LCD
 TextLCD_I2C_N lcd(&i2c, 0x7c, TextLCD::LCD8x2);  // LCD(Akizuki  AQM0802A)
 #endif