Gravity__I2C_VEML7700_Ambient_Light_Sensor_SKU__SEN0228-DFRobot

SEN0228 Gravity: I2C VEML7700 Ambient Light Sensor (0~120Klx)

Introduction

VEML7700 is a high accuracy ambient light digital 16-bit resolution sensor. It includes a high sensitive photo diode, a low noise amplifier, a 16-bit A/D converter and supports an easy to use Gravity I2C interface. It outputs a digital signal directly and no need for complicated calculations. This is a more acurate and easier to use version of the simple foto resistor which only outputs a voltage that needs to be calculated in order to obtain meaningful data. The data which is output by this sensor is directly output in Lux (Lx). When objects which are lighted in homogeneous get the 1 lx luminous flux in one square meter ,their light intensity is 1lx. Sometimes to take good advantage of the illuminant, you can add a reflector to the illuminant. So that there will be more luminous flux in some directions and it can increase the ilumination of the target surface.

For example:

Specification

Board Overview

SEN0228 Gravity: I2C VEML7700 Ambient Light Sensor (0~120Klx) Board Overview
Num Label Description
1 SDA IIC-Data
2 SCL IIC-Clock
3 GND GND
4 VCC VCC

Tutorial

Requirements

Connection Diagram

SEN0228 Gravity: I2C VEML7700 Ambient Light Sensor (0~120Klx) Connection Diagram

Sample Code

Download VEML7700 Arduino Library How to install Libraries in Arduino IDE

/*!
 * @file readVEML7700.ino
 * @brief DFRobot's VEML7700 ambient light sensor
 * @n     High Accuracy Ambient Light Sensor
 * @copyright  Copyright (c) 2010 DFRobot Co.Ltd (http://www.dfrobot.com)
 * @license  The MIT License (MIT)
 * @author  [yangyang](971326313@qq.com)
 * @version  V1.0
 * @date  2016-12-08
 * @url  https://github.com/DFRobot/DFRobot_VEML7700
  */

#include "DFRobot_VEML7700.h"
#include <Wire.h>

/*
 * Instantiate an object to drive the sensor
 */
DFRobot_VEML7700 als;

void setup()
{
  Serial.begin(9600);
  als.begin();   // Init
}

void loop()
{
  float lux;

  als.getALSLux(lux);   // Get the measured ambient light value
  Serial.print("Lux:");
  Serial.print(lux);
  Serial.println(" lx");

  delay(200);
}

Expected Results

SEN0228 Gravity: I2C VEML7700 Ambient Light Sensor (0~120Klx) Expected Results

FAQ

For any questions, advice or cool ideas to share, please visit the DFRobot Forum.

More Documents