Adafruit VCNL4010
Classes | Macros | Enumerations
Adafruit_VCNL4010.h File Reference
#include "WProgram.h"
#include <Adafruit_I2CDevice.h>

Go to the source code of this file.

Classes

class  Adafruit_VCNL4010
 The VCNL4010 class. More...
 

Macros

#define VCNL4010_I2CADDR_DEFAULT   0x13
 I2C address of the sensor.
 
#define VCNL4010_COMMAND   0x80
 Command. More...
 
#define VCNL4010_PRODUCTID   0x81
 Product ID Revision.
 
#define VCNL4010_PROXRATE   0x82
 Proximity rate.
 
#define VCNL4010_IRLED   0x83
 IR LED current.
 
#define VCNL4010_AMBIENTPARAMETER   0x84
 Ambient light parameter.
 
#define VCNL4010_AMBIENTDATA   0x85
 Ambient light result (16 bits)
 
#define VCNL4010_PROXIMITYDATA   0x87
 Proximity result (16 bits)
 
#define VCNL4010_INTCONTROL   0x89
 Interrupt control.
 
#define VCNL4010_LOWTHRESHOLD   0x8A
 Low threshold value (16 bits)
 
#define VCNL4010_HITHRESHOLD   0x8C
 High threshold value (16 bits)
 
#define VCNL4010_INTSTAT   0x8E
 Interrupt status.
 
#define VCNL4010_MODTIMING   0x8F
 Proximity modulator timing adjustment.
 
#define VCNL4010_MEASUREPROXIMITY   0x08
 Start a single on-demand proximity measurement. More...
 
#define VCNL4010_MEASUREAMBIENT   0x10
 Start a single on-demand ambient light measurement.
 
#define VCNL4010_PROXIMITYREADY   0x20
 Read-only - Value = 1 when proximity measurement data is available.
 
#define VCNL4010_AMBIENTREADY   0x40
 available More...
 

Enumerations

enum  vcnl4010_freq {
  VCNL4010_1_95 = 0, VCNL4010_3_90625 = 1, VCNL4010_7_8125 = 2, VCNL4010_16_625 = 3,
  VCNL4010_31_25 = 4, VCNL4010_62_5 = 5, VCNL4010_125 = 6, VCNL4010_250 = 7
}
 

Detailed Description

Author: K. Townsend (Adafruit Industries) License: BSD (see license.txt)

This is a library for the Aadafruit VCNL4010 proximity sensor breakout board -—> http://www.adafruit.com/products/466

Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit!

v1.0 - First release

Macro Definition Documentation

◆ VCNL4010_COMMAND

#define VCNL4010_COMMAND   0x80

Command.

Registers

◆ VCNL4010_MEASUREPROXIMITY

#define VCNL4010_MEASUREPROXIMITY   0x08

Start a single on-demand proximity measurement.

Values for command register

◆ VCNL4010_AMBIENTREADY

#define VCNL4010_AMBIENTREADY   0x40

available

Read-only - Value = 1 when ambient light measurement data is

Enumeration Type Documentation

◆ vcnl4010_freq

Proximity measurement rate