Reference

Last revision 2025/12/18

Library

Download and install the VL6180 Library and Sample Codes. (About how to install the library?)

Communication Protocol Description

I2C Address: 0x29

API Description

  /** param:mode  default: VL6180X_SINGEL
        VL6180X_SINGEL                    0x00           A single measurement of ALS and range
        VL6180X_CONTINUOUS_RANGE          0x01           Continuous measuring range
        VL6180X_CONTINUOUS_ALS            0x02           Continuous measuring ALS
        VL6180X_INTERLEAVED_MODE          0x03           Continuous cross measurement of ALS and range
  */
  VL6180X.setMode(VL6180X_INTERLEAVED_MODE);

  /**
   * @brief  Obtain ambient light data
   * @return Measured ambient light data
   */
  float getALSValue();

  /**
   * @brief  Obtain range data
   * @return Measured range data
   */
  uint8_t getRangeVlaue();

Other Supplementary Information

Was this article helpful?

TOP