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_6180XA1 mbed
Fork of HelloWorld_6180XA1 by
X-Nucleo-6180XA1 Hello World Application
This application provides a simple example of usage of X_NUCLEO_6180XA1 library. It provides a measurement of:
- Ambient Light (Lux),
- Distance (millimeters) of an object in front of the on-board sensor.
The values are displayed on the Hyperterminal connected through COM port over USB.
Diff: main.cpp
- Revision:
- 37:724632fff9c1
- Parent:
- 36:0d4aa5b3234d
- Child:
- 39:851cfabf7aa6
diff -r 0d4aa5b3234d -r 724632fff9c1 main.cpp
--- a/main.cpp Fri Nov 27 08:51:03 2015 +0000
+++ b/main.cpp Thu Dec 03 09:11:44 2015 +0000
@@ -20,17 +20,12 @@
is not ready to be read from the corresponding register. So you need to wait
for the result to be ready */
-#define VL6180X_I2C_SDA D14 //I2C_SDA
-#define VL6180X_I2C_SCL D15 //I2C_SCL
+#define VL6180X_I2C_SDA D14
+#define VL6180X_I2C_SCL D15
#define RANGE 0
#define ALS 1
-/* timer and digital out pin used for debugging */
-//Timer timer;
-//int start, end;
-//DigitalOut pin(PA_15);
-
static X_NUCLEO_6180XA1 *board=NULL;
MeasureData_t data_sensor_top;
OperatingMode operating_mode, prev_operating_mode;

X-NUCLEO-6180XA1 Proximity and Ambient Light Sensor