# Adafruit VL6180X Time of Flight Micro-LIDAR Distance Sensor Breakout

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/089/848/medium800thumb/proximity_VL6180_GIF.jpg?1585156038)

The VL6180X is a Time of Flight distance sensor like no other you've used! The sensor contains a very tiny invisible laser source, and a matching sensor. The VL6180X can detect the "time of flight", or how long the light has taken to bounce back to the sensor. Since it uses a very narrow light source, it is good for determining distance of only the surface directly in front of it. Unlike sonars that bounce ultrasonic waves, the 'cone' of sensing is very narrow. Unlike IR distance sensors that try to measure the amount of light bounced, the VL6180X is much more precise and doesn't have linearity problems or 'double imaging' where you can't tell if an object is very far or very close.

![](https://cdn-learn.adafruit.com/assets/assets/000/089/849/medium800/proximity_VL6180_top_angle.jpg?1585156101)

As if that weren't enough, we've also added[&nbsp;SparkFun qwiic](https://www.sparkfun.com/qwiic)&nbsp;compatible&nbsp;**[STEMMA QT](https://learn.adafruit.com/introducing-adafruit-stemma-qt)**&nbsp;connectors for the I2C bus **so you don't even need to solder.** Just wire up to your favorite micro with a plug-and-play cable to get 6-DoF data ASAP. For a no-solder experience,&nbsp;[just wire up to your favorite micro, like the STM32F405 Feather](https://www.adafruit.com/product/4382)&nbsp;using a&nbsp;[STEMMA QT adapter cable.](https://www.adafruit.com/?q=stemma%20qt%20cable)&nbsp;The Stemma QT connectors also mean the VL6180 can be used with our&nbsp;[various associated accessories.](https://www.adafruit.com/?q=JST%20SH%204)

![](https://cdn-learn.adafruit.com/assets/assets/000/037/602/medium800/proximity_3316_iso_ORIG.jpg?1480481025)

This is the 'little sister' of the VL53L0X ToF sensor, and can handle about 5mm to 200mm of range distance. It also includes a lux sensor. If you need a larger range, check out the VL53L0X which can measure 50 - 1200 mm.

![](https://cdn-learn.adafruit.com/assets/assets/000/089/853/medium800/proximity_VL6180_top_header.jpg?1585157520)

The sensor is small and easy to use in any robotics or interactive project. Since it needs 2.8V power and logic we put the little fellow on a breakout board with a regulator and level shifting. You can use it with any 3-5V power or logic microcontroller with no worries. Each order comes with a small piece of header. Solder the header onto your breakout board with your iron and some solder and wire it up for instant distance-sensing-success!

![](https://cdn-learn.adafruit.com/assets/assets/000/037/604/medium800/proximity_3316_quarter_ORIG.jpg?1480481048)

Communicating to the sensor is done over I2C with some simple commands. Most of the work is handled inside the sensor itself, so its very easy to port our Arduino library to another microcontroller.

![](https://cdn-learn.adafruit.com/assets/assets/000/089/851/medium800/proximity_VL6180_back.jpg?1585157485)

# Adafruit VL6180X Time of Flight Micro-LIDAR Distance Sensor Breakout

## Pinouts

The VL6180X is a I2C sensor. That means it uses the two I2C data/clock wires available on most microcontrollers, and can share those pins with other sensors as long as they don't have an address collision. For future reference, the I2C address is **0x29** and you _can't_ change it!

![](https://cdn-learn.adafruit.com/assets/assets/000/089/846/medium800/proximity_VL6180_top.jpg?1585155831)

## Power Pins:

- **Vin** - this is the power pin. Since the chip uses 2.8 VDC, we have included a voltage regulator on board that will take 3-5VDC and safely convert it down. To power the board, give it the same power as the logic level of your microcontroller - e.g. for a 5V micro like Arduino, use 5V
- **2v8** - this is the 2.8V output from the voltage regulator, you can grab up to 100mA from this if you like
- **GND** - common ground for power and logic

## I2C Logic pins:

- **SCL** - I2C clock pin, connect to your microcontrollers I2C clock line.
- **SDA** - I2C data pin, connect to your microcontrollers I2C data line.
- **[STEMMA QT](https://learn.adafruit.com/introducing-adafruit-stemma-qt)&nbsp;-** These connectors allow you to connectors to dev boards with&nbsp; **STEMMA QT** connectors or to other things with&nbsp;[various associated accessories](https://www.adafruit.com/?q=JST%20SH%204)

# Control Pins:

- **GPIO** - this is a pin that is used by the sensor to indicate that data is ready. It's useful for when doing continuous sensing. Note there is no level shifting on this pin, you may not be able to read the 2.8V-logic-level voltage on a 5V microcontroller (we could on an arduino UNO but no promises). Our library doesn't make use of this pin but for advanced users, it's there!
- **XSHUT/SHDN** - the shutdown pin for the sensor. By default it's pulled high. There's a level-shifting diode so you can use 3-5V logic on this pin. When the pin is pulled low, the sensor goes into shutdown mode.

![](https://cdn-learn.adafruit.com/assets/assets/000/037/605/medium800/proximity_pinouts.jpg?1480481116)

# Adafruit VL6180X Time of Flight Micro-LIDAR Distance Sensor Breakout

## Assembly

Warning: 

![](https://cdn-learn.adafruit.com/assets/assets/000/037/612/medium800/adafruit_products_3316_kit_ORIG.jpg?1480534559)

 **This page shows the VL53L0X or VL6180X sensor - the procedure is identical!**

## Prepare the header strip:

&nbsp;

Cut the strip to length if necessary. It will be easier to solder if you insert it into a breadboard - **long pins down**

![adafruit_products_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/037/613/medium640/adafruit_products_bb.jpg?1480534909)

Place the Breakout board on top so the shorter ends of the pins line up though all the pads

![adafruit_products_place.jpg](https://cdn-learn.adafruit.com/assets/assets/000/037/614/medium640/adafruit_products_place.jpg?1480534928)

## Solder!

&nbsp;

Be sure to solder all pins for reliable electrical contact.  
  
  
_(For tips on soldering, be sure to check out our&nbsp;_[_Guide to Excellent Soldering_](http://learn.adafruit.com/adafruit-guide-excellent-soldering)_)._

![adafruit_products_solder.jpg](https://cdn-learn.adafruit.com/assets/assets/000/037/615/medium640/adafruit_products_solder.jpg?1480534948)

![adafruit_products_solder2.jpg](https://cdn-learn.adafruit.com/assets/assets/000/037/616/medium640/adafruit_products_solder2.jpg?1480534951)

![adafruit_products_solder3.jpg](https://cdn-learn.adafruit.com/assets/assets/000/037/617/medium640/adafruit_products_solder3.jpg?1480534954)

OK You're done! Check your work over and continue on to the next steps

![adafruit_products_done.jpg](https://cdn-learn.adafruit.com/assets/assets/000/037/618/medium640/adafruit_products_done.jpg?1480534961)

# Adafruit VL6180X Time of Flight Micro-LIDAR Distance Sensor Breakout

## Arduino Code

You can easily wire this breakout to any microcontroller, we'll be using an Arduino. For another kind of microcontroller, just make sure it has I2C, then port the API code. We strongly recommend using an Arduino to start though!

# Wiring

There's two versions of this sensor, and **the pin orders vary slightly so be sure to read the text on the breakout to match the pins to the wiring diagrams**.

- Connect **Vin** to the power supply, 3-5V is fine. Use the same voltage that the microcontroller logic is based off of. For most Arduinos, that is 5V **(red wire on STEMMA)**
- Connect **GND** to common power/data ground **(black wire on STEMMA)**
- Connect the **SCL** pin to the I2C clock **SCL** pin on your Arduino. On an UNO & '328 based Arduino, this is also known as **A5** , on a Mega it is also known as **digital 21** and on a Leonardo/Micro, **digital 3 (yellow wire on STEMMA)**  
- Connect the **SDA** pin to the I2C data **SDA** pin on your Arduino. On an UNO & '328 based Arduino, this is also known as **A4** , on a Mega it is also known as **digital 20** and on a Leonardo/Micro, **digital 2 (blue wire on STEMMA)**  

The VL6180X has a default I2C address of 0x29!

![proximity_vl6180.png](https://cdn-learn.adafruit.com/assets/assets/000/037/606/medium640/proximity_vl6180.png?1585249603)

![proximity_VL6180_arduino_breadboard_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/089/956/medium640/proximity_VL6180_arduino_breadboard_bb.jpg?1585260039)

![proximity_VL6180_arduino_STEMMA_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/089/957/medium640/proximity_VL6180_arduino_STEMMA_bb.jpg?1585260051)

# Install Adafruit\_VL6180X

To begin reading sensor data, you will need to [install Adafruit\_VL6180X Library from our github repository](https://github.com/adafruit/Adafruit_VL6180X). It is available from the Arduino library manager so we recommend using that.

From the IDE open up the library manager...

![](https://cdn-learn.adafruit.com/assets/assets/000/050/304/medium800/proximity_managelib.png?1516329313)

And type in **adafruit vl6180** to locate the library. Click **Install**

![](https://cdn-learn.adafruit.com/assets/assets/000/050/305/medium800/proximity_vl6.png?1516329607)

We also have a great tutorial on Arduino library installation at:  
[http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use](http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use "Link: http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use")

# Load Demo

Open up **File-\>Examples-\>Adafruit\_VL6180X**** -\>vl6180x** and upload to your Arduino wired up to the sensor

![](https://cdn-learn.adafruit.com/assets/assets/000/037/607/medium800/proximity_example.png?1480484175)

Thats it! Now open up the serial terminal window at 115200 speed to begin the test.

![](https://cdn-learn.adafruit.com/assets/assets/000/037/611/medium800/proximity_demo.png?1480533925)

Move your hand up and down to read the sensor data, the range readings are in millimeters and the light sensors in Lux. Note that when nothing is detected, it will print out the error which may vary.

# Library Reference

&nbsp;You can start out by creating a Adafruit\_VL6180X object using the default I2C:

```
Adafruit_VL6180X vl = Adafruit_VL6180X();
```

Once started, you can initialize the sensor which will also do some simple initializations and settings using **begin()**. Note that this will return True if the sensor was found and initialized. If not, it will return False.

```
vl.begin()
```

# Reading Distance

Reading the range/distance is easy, just call **readRange()**

```
vl.readRange()
```

which will return the range in millimeters. If you get 0 or a value over 200 there's likely an error. Either way, before you trust that reading make sure to ask the sensor if the last reading had an error:

```
uint8_t status = vl.readRangeStatus()
```

The status will be **0** on no error, anything else is an error. Here's a simple code chunk that will decode the error!

```
  if  ((status &gt;= VL6180X_ERROR_SYSERR_1) &amp;&amp; (status &lt;= VL6180X_ERROR_SYSERR_5)) {
    Serial.println("System error");
  }
  else if (status == VL6180X_ERROR_ECEFAIL) {
    Serial.println("ECE failure");
  }
  else if (status == VL6180X_ERROR_NOCONVERGE) {
    Serial.println("No convergence");
  }
  else if (status == VL6180X_ERROR_RANGEIGNORE) {
    Serial.println("Ignoring range");
  }
  else if (status == VL6180X_ERROR_SNR) {
    Serial.println("Signal/Noise error");
  }
  else if (status == VL6180X_ERROR_RAWUFLOW) {
    Serial.println("Raw reading underflow");
  }
  else if (status == VL6180X_ERROR_RAWOFLOW) {
    Serial.println("Raw reading overflow");
  }
  else if (status == VL6180X_ERROR_RANGEUFLOW) {
    Serial.println("Range reading underflow");
  }
  else if (status == VL6180X_ERROR_RANGEOFLOW) {
    Serial.println("Range reading overflow");
  }
```

# Reading Light / Lux

You can also read a light reading from the sensor with

```
vl.readLux(GAIN)
```

which will return a semi-calibrated Lux reading. You can use different Gain settings to get a different range. For better results at low light,&nbsp; use higher gain. For better results at high light, use a lower gain.

Here's the gain's available:

- **VL6180X\_ALS\_GAIN\_1&nbsp;** &nbsp; - gain of 1x
- **VL6180X\_ALS\_GAIN\_1\_25** &nbsp;&nbsp;&nbsp; - gain of 1.25x
- **VL6180X\_ALS\_GAIN\_1\_67** &nbsp;&nbsp;&nbsp; - gain of 1.67x
- **VL6180X\_ALS\_GAIN\_2\_5** &nbsp;&nbsp;&nbsp; - gain of 2.5x
- **VL6180X\_ALS\_GAIN\_5** &nbsp;&nbsp;&nbsp; - gain of 5x
- **VL6180X\_ALS\_GAIN\_10** &nbsp;&nbsp; - gain of 10x
- **VL6180X\_ALS\_GAIN\_20** &nbsp;&nbsp; - gain of 20x
- **VL6180X\_ALS\_GAIN\_40** &nbsp;&nbsp; - gain of 40x

We suggest starting with a gain of 5x and then adjusting up or down as necessary

# Adafruit VL6180X Time of Flight Micro-LIDAR Distance Sensor Breakout

## Arduino Library Docs

# Adafruit VL6180X Time of Flight Micro-LIDAR Distance Sensor Breakout

## Python & CircuitPython

It's easy to use the VL6180X sensor with Python and CircuitPython, and the&nbsp;[Adafruit CircuitPython VL6180X](https://github.com/adafruit/Adafruit_CircuitPython_VL6180X)&nbsp;module.&nbsp; This module allows you to easily write Python code that reads the light and proximity readings from the sensor.

You can use this sensor with any CircuitPython microcontroller board or with a computer that has GPIO and Python [thanks to Adafruit\_Blinka, our CircuitPython-for-Python compatibility library](https://learn.adafruit.com/circuitpython-on-raspberrypi-linux).

# CircuitPython Microcontroller Wiring
First wire up a VL6180 breakout to your board exactly as shown below. Here's an example of wiring a Feather M4 to the sensor with I2C:

- **Board GND** &nbsp;to&nbsp;**sensor GND (black wire)**
- **Board 3V** &nbsp;to&nbsp;**sensor VIN (red wire)**  
- **Board SDA** &nbsp;to&nbsp;**sensor SDA (blue wire)**
- **Board SCL** &nbsp;to&nbsp;**sensor SCL (yellow wire)**  

![proximity_VL6180_Feather_M4_STEMMA_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/089/862/medium640/proximity_VL6180_Feather_M4_STEMMA_bb.jpg?1585162539)

- **Board GND** &nbsp;to&nbsp;**sensor GND (black wire)**
- **Board 3V** &nbsp;to&nbsp;**sensor VIN (red wire)**  
- **Board SDA** &nbsp;to&nbsp;**sensor SDA (blue wire)**
- **Board SCL** &nbsp;to&nbsp;**sensor SCL (yellow wire)**

![proximity_VL6180_Feather_M4_breadboard_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/089/920/medium640/proximity_VL6180_Feather_M4_breadboard_bb.jpg?1585249968)

Here's an example of wiring a Feather M0 to the sensor with I2C:

- **Board 3V** &nbsp;to&nbsp; **sensor VIN**
- **Board GND** &nbsp;to&nbsp; **sensor GND**
- **Board SCL** &nbsp;to&nbsp; **sensor SCL**
- **Board SDA** &nbsp;to&nbsp; **sensor SDA**

![proximity_m0_vl6180x_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/050/302/medium640/proximity_m0_vl6180x_bb.png?1534286795)

# Python Computer Wiring

Since there's _dozens_ of Linux computers/boards you can use we will show wiring for Raspberry Pi. For other platforms, [please visit the guide for CircuitPython on Linux to see whether your platform is supported](https://learn.adafruit.com/circuitpython-on-raspberrypi-linux).&nbsp;

Here's the Raspberry Pi wired with I2C:

- **Pi GND** to **sensor GND (black wire)**
- **Pi 3V3** to **sensor VIN (red wire)**  
- **Pi SDA** to **sensor SDA (blue wire)**
- **Pi SCL** to **sensor SCL (yellow wire)**  

![proximity_VL6180_Raspi_STEMMA_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/089/863/medium640/proximity_VL6180_Raspi_STEMMA_bb.jpg?1585162616)

- **Pi GND** to **sensor GND (black wire)**
- **Pi 3V3** to **sensor VIN (red wire)**  
- **Pi SDA** to **sensor SDA (blue wire)**
- **Pi SCL** to **sensor SCL (yellow wire)**  

![proximity_VL6180_Raspi_STEMMA_breadboard_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/089/921/medium640/proximity_VL6180_Raspi_STEMMA_breadboard_bb.jpg?1585250008)

- **Pi 3V3** to **sensor VIN**
- **Pi GND** to **sensor GND**
- **Pi SCL** to **sensor SCL**
- **Pi SDA** to **sensor SDA**

![proximity_raspi_vl6180_i2c_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/059/114/medium640/proximity_raspi_vl6180_i2c_bb.jpg?1534286913)

# CircuitPython Installation of VL6180X Library

Next you'll need to install the&nbsp;[Adafruit CircuitPython VL6180X](https://github.com/adafruit/Adafruit_CircuitPython_VL6180X)&nbsp;library on your CircuitPython board.&nbsp;&nbsp;

First make sure you are running the&nbsp;[latest version of Adafruit CircuitPython](https://learn.adafruit.com/welcome-to-circuitpython/installing-circuitpython)&nbsp;for your board.

Next you'll need to install the necessary libraries&nbsp;to use the hardware--carefully follow the steps to find and install these libraries from&nbsp;[Adafruit's CircuitPython library bundle](https://github.com/adafruit/Adafruit_CircuitPython_Bundle).&nbsp; Our introduction guide has&nbsp;[a great page on how to install the library bundle](../../../../welcome-to-circuitpython/circuitpython-libraries)&nbsp;for both express and non-express boards.

Remember for non-express boards like the, you'll need to manually install the necessary libraries from the bundle:

- **adafruit\_vl6180x.mpy**
- **adafruit\_bus\_device**

Before continuing make sure your board's lib folder or root filesystem has the&nbsp; **adafruit\_vl6180x.mpy,&nbsp;** and **&nbsp;adafruit\_bus\_device**** &nbsp; **files and folders** &nbsp;**copied over.

Next[&nbsp;connect to the board's serial REPL](https://learn.adafruit.com/welcome-to-circuitpython/the-repl) so you are at the CircuitPython&nbsp; **\>\>\>** &nbsp;prompt.

# Python Installation of VL6180X Library

You'll need to install the Adafruit\_Blinka library that provides the CircuitPython support in Python. This may also require enabling I2C on your platform and verifying you are running Python 3. [Since each platform is a little different, and Linux changes often, please visit the CircuitPython on Linux guide to get your computer ready](https://learn.adafruit.com/circuitpython-on-raspberrypi-linux)!

Once that's done, from your command line run the following command:

- `sudo pip3 install adafruit-circuitpython-vl6180x`

If your default Python is version 3 you may need to run 'pip' instead. Just make sure you aren't trying to use CircuitPython on Python 2.x, it isn't supported!

# CircuitPython & Python Usage

To demonstrate the usage of the sensor we'll initialize it and read the distance and more from the board's Python REPL.&nbsp; Run the following code to import the necessary modules to initialize the I2C bus and sensor:

```
import board
import busio
import adafruit_vl6180x
i2c = busio.I2C(board.SCL, board.SDA)
sensor = adafruit_vl6180x.VL6180X(i2c)
```

Now you're ready to read the range and other values from the sensor.&nbsp; You can do so with a few properties and functions:

- **range** Property - This property returns the range as read from the sensor in millimeters.
- **range\_status** Property - This property returns any error or issues that was encountered while reading the range.&nbsp; You can compare against a few global values to see what might have occured.&nbsp; Check the datasheet for more details about these error cases and how to resolve them:
  - `adafruit_vl6180x.ERROR_NONE`
  - `adafruit_vl6180x.ERROR_SYSERR_1`
  - `adafruit_vl6180x.ERROR_SYSERR_5`
  - `adafruit_vl6180x.ERROR_ECEFAIL`
  - `adafruit_vl6180x.ERROR_NOCONVERGE`
  - `adafruit_vl6180x.ERROR_RANGEIGNORE`
  - `adafruit_vl6180x.ERROR_SNR`
  - `adafruit_vl6180x.ERROR_RAWUFLOW`
  - `adafruit_vl6180x.ERROR_RAWOFLOW`
  - `adafruit_vl6180x.ERROR_RANGEUFLOW`
  - `adafruit_vl6180x.ERROR_RANGEOFLOW`

- **read\_lux** Function - This function can be called to read the light read from the sensor and return it in lux.&nbsp; In order to call this function you must specify a gain that will be used during the reading.&nbsp; Check the datasheet for more details on how gain impacts the reading and which value you might want to use for your application.&nbsp; You can specify gain as one of these values:
  - `adafruit_vl6180x.ALS_GAIN_1` - 1x gain
  - `adafruit_vl6180x.ALS_GAIN_1_25` - 1.25x gain
  - `adafruit_vl6180x.ALS_GAIN_1_67` - 1.67x gain
  - `adafruit_vl6180x.ALS_GAIN_2_5` - 2.5x gain
  - `adafruit_vl6180x.ALS_GAIN_5` - 5x gain
  - `adafruit_vl6180x.ALS_GAIN_10` - 10x gain
  - `adafruit_vl6180x.ALS_GAIN_20` - 20x gain
  - `adafruit_vl6180x.ALS_GAIN_40` - 40x gain

```
print('Range: {0}mm'.format(sensor.range))
print('Range status: {0}'.format(sensor.range_status))
print('Light (1x gain): {0}lux'.format(sensor.read_lux(adafruit_vl6180x.ALS_GAIN_1)))
```

![](https://cdn-learn.adafruit.com/assets/assets/000/050/303/medium800/proximity_Screen_Shot_2018-01-18_at_4.44.10_PM.png?1516322686)

That's all there is to using the VL6180X distance sensor with CircuitPython!

Here's a complete example that will read the range and lux (using 1x gain) each second and print it out.&nbsp; Save this as **code.py** on your board and open the REPL to see the output.

# Full Example Code
https://github.com/adafruit/Adafruit_CircuitPython_VL6180X/blob/main/examples/vl6180x_simpletest.py

# Adafruit VL6180X Time of Flight Micro-LIDAR Distance Sensor Breakout

## Python Docs

# Adafruit VL6180X Time of Flight Micro-LIDAR Distance Sensor Breakout

## WipperSnapper

![](https://cdn-learn.adafruit.com/assets/assets/000/128/458/medium800/proximity_adafruit_products_01_DeviceList.png?1709315242)

## What is WipperSnapper

WipperSnapper is a firmware designed to turn any WiFi-capable board into an Internet-of-Things device without programming a single line of code. WipperSnapper connects to [Adafruit IO](https://io.adafruit.com/), a web&nbsp;platform designed ([by Adafruit!](https://www.adafruit.com/about)) to&nbsp;_display_,&nbsp;_respond_, and&nbsp;_interact_&nbsp;with your project's data.

Simply load the WipperSnapper firmware onto your board, add credentials, and plug it into power. Your board will automatically register itself with your Adafruit IO account.

From there, you can add&nbsp;_components_&nbsp;to your board such as buttons, switches, potentiometers, sensors, and more! Components are&nbsp;_dynamically&nbsp;_added to hardware, so you can&nbsp;immediately start interacting, logging, and streaming the data your projects produce without writing code.

If you've never used WipperSnapper, click below to read through the quick start guide before continuing.

[Quickstart: Adafruit IO WipperSnapper](https://learn.adafruit.com/quickstart-adafruit-io-wippersnapper)
## Wiring
First, wire up an VL6180X to your board exactly as follows. Here is an example of the VL6180X wired to an&nbsp;[Adafruit ESP32 Feather V2](https://www.adafruit.com/product/5400)&nbsp;using I2C&nbsp;[with a STEMMA QT cable (no soldering required)](https://www.adafruit.com/product/4210)

- **Board 3V** &nbsp;to&nbsp;**sensor VIN (red wire on STEMMA QT)**  
- **Board GND** &nbsp;to&nbsp;**sensor GND (black wire on STEMMA QT)**  
- **Board SCL** &nbsp;to&nbsp;**sensor SCL (yellow wire on STEMMA QT)**  
- **Board SDA** &nbsp;to&nbsp;**sensor SDA (blue wire on STEMMA QT)**

![proximity_featherV2_VL6180_STEMMAQT_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/128/425/medium640/proximity_featherV2_VL6180_STEMMAQT_bb.png?1709310292)

![proximity_featherV2_VL6180_Breadboard_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/128/426/medium640/proximity_featherV2_VL6180_Breadboard_bb.png?1709310317)

## Usage

Connect your board to Adafruit IO Wippersnapper and **[navigate to the WipperSnapper board list](https://io.adafruit.com/wippersnapper).**

On this page, **select the WipperSnapper board you're using** to be brought to the board's interface page.

![](https://cdn-learn.adafruit.com/assets/assets/000/128/459/medium800/proximity_adafruit_products_02_DeviceSelection_croppped.png?1709315337)

If you do not see your board listed here - you need [to connect your board to Adafruit IO](https://learn.adafruit.com/quickstart-adafruit-io-wippersnapper) first.

On the device page, quickly&nbsp; **check that you're running the latest version of the WipperSnapper firmware**.

The device tile on the left indicates the version number of the firmware running on the connected board.

- **If the firmware version is green with a checkmark -** &nbsp;continue with this guide.
- **If the firmware version is red with an exclamation mark "!" -** &nbsp;[update to the latest WipperSnapper firmware](https://learn.adafruit.com/quickstart-adafruit-io-wippersnapper)&nbsp;on your board before continuing.

![proximity_adafruit_products_04_LatestVersion.png](https://cdn-learn.adafruit.com/assets/assets/000/128/466/medium640/proximity_adafruit_products_04_LatestVersion.png?1709316044)

![proximity_adafruit_products_04_UpdateRequired.png](https://cdn-learn.adafruit.com/assets/assets/000/128/467/medium640/proximity_adafruit_products_04_UpdateRequired.png?1709316057)

Next, make sure the sensor is plugged into your board and click the **&nbsp;I2C Scan&nbsp;** button.

![](https://cdn-learn.adafruit.com/assets/assets/000/113/177/medium800/sensor_page_crop_scan.png?1657724520)

You should see the VL6180X's default I2C address of&nbsp;`0x29`&nbsp;pop-up in the I2C scan list.

![](https://cdn-learn.adafruit.com/assets/assets/000/128/460/medium800/proximity_Screenshot_2024-03-01_173622.png?1709315658)

###  I don't see the sensor's I2C address listed! 


First, double-check the connection and/or wiring between the sensor and the board.

Then, reset the board and let it re-connect to Adafruit IO WipperSnapper.

With the sensor detected in an I2C scan, you're ready to add the sensor to your board.

**Click the New Component button or the + button** to bring up the component picker.

![](https://cdn-learn.adafruit.com/assets/assets/000/127/931/medium800/sensor_page_temperature___humidity_06_AddComponent.png?1708631009)

Adafruit IO supports a large amount of components. To quickly find your sensor, type&nbsp;`VL6180X`&nbsp;into the search bar, then select the&nbsp; **VL6180X** &nbsp;component.

![](https://cdn-learn.adafruit.com/assets/assets/000/128/461/medium800/proximity_rbA1Jdr1mN.png?1709315774)

On the component configuration page, the VL6180X's sensor address should be listed along with the sensor's settings.

The&nbsp; **Send Every** &nbsp;option is specific to each sensor's measurements. This option will tell the Feather how often it should read from the VL6180X sensor and send the data to Adafruit IO. Measurements can range from every 30 seconds to every 24 hours.

For this example, set the&nbsp; **Send Every&nbsp;** interval to every 30 seconds.

![](https://cdn-learn.adafruit.com/assets/assets/000/128/462/medium800/proximity_H4UW4oA2w4.png?1709315803)

Your device interface should now show the sensor components you created. After the interval you configured elapses, WipperSnapper will automatically read values from the sensor(s) and send them to Adafruit IO.

![](https://cdn-learn.adafruit.com/assets/assets/000/128/463/medium800/proximity_mj50hqygoa.png?1709315882)

To view the data that has been logged from the sensor, click on the graph next to the sensor name.

![](https://cdn-learn.adafruit.com/assets/assets/000/128/464/medium800/proximity_FJwVzVwWES.png?1709315895)

Here you can see the feed history and edit things about the feed such as the name, privacy, webhooks associated with the feed and more. If you want to learn more about how feeds work, [check out this page](https://learn.adafruit.com/all-the-internet-of-things-episode-four-adafruit-io/advanced-feeds).

![](https://cdn-learn.adafruit.com/assets/assets/000/128/465/medium800/proximity_jI3XHaHlLD.png?1709315980)

# Adafruit VL6180X Time of Flight Micro-LIDAR Distance Sensor Breakout

## Downloads

# Files & Datasheets

- [Datasheet for the VL6180X](https://cdn-learn.adafruit.com/assets/assets/000/037/608/original/VL6180X_datasheet.pdf)
- [ST product page](http://www.st.com/en/imaging-and-photonics-solutions/vl6180x.html) with more details including API downloads
- [Fritzing object in Adafruit Fritzing library](https://github.com/adafruit/Fritzing-Library)
- [STEMMA revision Fritzing object in Adafruit Fritzing library](https://github.com/adafruit/Fritzing-Library/blob/master/parts/Adafruit%20VL6180%20Time%20of%20Flight%20Sensor.fzpz)
- [EagleCAD PCB files in GitHub](https://github.com/adafruit/Adafruit-VL6180X-ToF-Distance-Sensor-PCB)
- [3D model on GitHub](https://github.com/adafruit/Adafruit_CAD_Parts/tree/main/3316%20VL6180%20ToF%20Sensor)

# Schematic & Fabrication Print
STEMMA revision:

![](https://cdn-learn.adafruit.com/assets/assets/000/089/845/medium800/proximity_VL6180_STEMMA_sch.png?1585155698)

Original:

![](https://cdn-learn.adafruit.com/assets/assets/000/037/610/medium800/proximity_schem.png?1480533781)

STEMMA revision:

![](https://cdn-learn.adafruit.com/assets/assets/000/089/844/medium800/proximity_VL6180_STEMMA_fab_print.png?1585155656)

Use M2.5 or #2-56 screws to mount

Original:

![](https://cdn-learn.adafruit.com/assets/assets/000/037/609/medium800/proximity_fab.png?1480533762)

![](https://cdn-learn.adafruit.com/assets/assets/000/139/677/medium800/proximity_3316_VL6180_ToF_Sensor.jpg?1757956539 )


## Featured Products

### Adafruit VL6180X Time of Flight Distance Ranging Sensor (VL6180)

[Adafruit VL6180X Time of Flight Distance Ranging Sensor (VL6180)](https://www.adafruit.com/product/3316)
The **VL6180X** (sometimes called the **VL6180** ) is a Time of Flight distance sensor like no other you've used! The sensor contains a very tiny laser source, and a matching sensor. The VL6180X can detect the "time of flight", or how long the laser light...

In Stock
[Buy Now](https://www.adafruit.com/product/3316)
[Related Guides to the Product](https://learn.adafruit.com/products/3316/guides)

## Related Guides

- [I2C Addresses and Troublesome Chips](https://learn.adafruit.com/i2c-addresses.md)
- [Porting an Arduino library to CircuitPython: VL6180X Distance Sensor](https://learn.adafruit.com/porting-an-arduino-library-to-circuitpython-vl6180x-distance-sensor.md)
- [Matrix Portal Money-Sensing Tip Jar](https://learn.adafruit.com/matrix-portal-money-sensing-tip-jar.md)
- [Adafruit BH1750 Ambient Light Sensor](https://learn.adafruit.com/adafruit-bh1750-ambient-light-sensor.md)
- [Adafruit High Power Infrared LED Emitter](https://learn.adafruit.com/adafruit-high-power-infrared-led-emitter.md)
- [Match3 Game on the Fruit Jam and  Adafruit Metro RP2350](https://learn.adafruit.com/match3-game-on-metro-rp2350.md)
- [Adafruit AD5693R 16-Bit DAC Breakout Board](https://learn.adafruit.com/adafruit-ad5693r-16-bit-dac-breakout-board.md)
- [MacroPad Summer Olympics Hotkeys](https://learn.adafruit.com/macropad-olympic-hotkeys.md)
- [Adafruit VL53L4CX Time of Flight Distance Sensor](https://learn.adafruit.com/adafruit-vl53l4cx-time-of-flight-distance-sensor.md)
- [Adafruit TCA8418 Keypad Matrix and GPIO Expander Breakout](https://learn.adafruit.com/adafruit-tca8418-keypad-matrix-and-gpio-expander-breakout.md)
- [NXP Precision 9DoF Breakout](https://learn.adafruit.com/nxp-precision-9dof-breakout.md)
- [Adafruit ADG729 Dual 1-to-4 Analog Matrix Switch](https://learn.adafruit.com/adafruit-adg729-dual-1-to-4-analog-matrix-switch.md)
- [Adafruit VCNL4040 Proximity Sensor](https://learn.adafruit.com/adafruit-vcnl4040-proximity-sensor.md)
- [Adafruit S-35710 Low-Power Wake Up Timer Breakout](https://learn.adafruit.com/adafruit-s-35710-low-power-wake-up-timer-breakout.md)
- [Adafruit I2C Quad Rotary Encoder Breakout](https://learn.adafruit.com/adafruit-i2c-quad-rotary-encoder-breakout.md)
