

The SparkFun VL6180 Breakout is a sophisticated sensor module that combines proximity sensing and ambient light measurement capabilities. Utilizing STMicroelectronics' VL6180 technology, this module provides accurate distance measurements through time-of-flight calculations, and it can also gauge the amount of ambient light. It is commonly used for applications such as gesture recognition, touchless control, robotics, and user interface enhancements.








| Pin Number | Name | Description |
|---|---|---|
| 1 | VIN | Supply voltage (2.8V to 3.6V) |
| 2 | GND | Ground connection |
| 3 | SCL | I2C clock line |
| 4 | SDA | I2C data line |
| 5 | GPIO1 | Programmable interrupt output |
| 6 | NC | No connection (reserved for future use) |
#include <Wire.h>
#include <VL6180X.h>
VL6180X sensor;
void setup() {
Serial.begin(9600);
Wire.begin();
sensor.init();
sensor.configureDefault();
sensor.setTimeout(500);
// Start continuous ranging at a rate of one measurement per second
sensor.startContinuous(1000);
}
void loop() {
Serial.print("Range: ");
Serial.print(sensor.readRangeContinuousMillimeters());
if (sensor.timeoutOccurred()) { Serial.print(" TIMEOUT"); }
Serial.print(" Ambient Light: ");
Serial.println(sensor.readAmbientContinuousLux());
delay(1000);
}
setTimeout function in the library to handle cases where the sensor does not respond.Q: Can the VL6180 be used outdoors? A: The VL6180 can be used outdoors but may be less reliable in direct sunlight.
Q: What is the maximum I2C speed supported by the VL6180? A: The VL6180 supports I2C speeds up to 400kHz.
Q: How can I change the I2C address of the sensor? A: The I2C address can be changed by writing to the I2C_SLAVE_DEVICE_ADDRESS register. However, this is an advanced feature and should be done with caution.
Q: Is the VL6180 Breakout compatible with 5V systems? A: The VL6180 operates at 2.8V to 3.6V. A level shifter is required for use with 5V systems.
This documentation provides a comprehensive guide to the SparkFun VL6180 Breakout, ensuring users can effectively integrate this sensor into their projects. For further assistance, consult the manufacturer's datasheet and additional resources.