test
Fork of HelloWorld_53L0A1 by
Revision 6:bc6c3c8c9976, committed 2017-01-31
- Comitter:
- zero515
- Date:
- Tue Jan 31 07:52:13 2017 +0000
- Parent:
- 5:029d3e5b117d
- Child:
- 7:e30d35831e6c
- Commit message:
- test
Changed in this revision
| X_NUCLEO_53L0A1.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/X_NUCLEO_53L0A1.lib Tue Dec 06 14:04:46 2016 +0000 +++ b/X_NUCLEO_53L0A1.lib Tue Jan 31 07:52:13 2017 +0000 @@ -1,1 +1,1 @@ -https://developer.mbed.org/teams/ST/code/X_NUCLEO_53L0A1/#35ecf3e060c3 +https://developer.mbed.org/teams/ST/code/X_NUCLEO_53L0A1/#8d27ebb4e1eb
--- a/main.cpp Tue Dec 06 14:04:46 2016 +0000
+++ b/main.cpp Tue Jan 31 07:52:13 2017 +0000
@@ -5,10 +5,11 @@
/* This VL53L0X Expansion board test application performs a range measurement in polling mode
on the onboard embedded top sensor. */
-#define VL53L0_I2C_SDA D14
-#define VL53L0_I2C_SCL D15
+#define VL53L0_I2C_SDA D4
+#define VL53L0_I2C_SCL D5
static X_NUCLEO_53L0A1 *board=NULL;
+Serial pc(USBTX, USBRX);
/*=================================== Main ==================================
@@ -17,6 +18,7 @@
{
int status;
uint32_t distance;
+ pc.baud(115200);
DevI2C *device_i2c =new DevI2C(VL53L0_I2C_SDA, VL53L0_I2C_SCL);
@@ -31,7 +33,7 @@
{
status = board->sensor_centre->GetDistance(&distance);
if (status == VL53L0X_ERROR_NONE)
- printf("Distance : %ld\n", distance);
+ printf("%ld\n\r", distance);
}
}
