VCNL4010  v1.1.0
Arduino Library for VCNL4010
VCNL4010.h File Reference
#include "Arduino.h"
#include <Wire.h>

Go to the source code of this file.

Classes

class  VCNL4010
 Main class definition. More...
 

Macros

#define VCNL4010_h
 Guard code definition for the VCNL4010 Library.
 
#define _BV(bit)   (1 << (bit))
 This macro isn't pre-defined on all platforms.
 
#define I2C_MODES
 Guard code definition for the various I2C modes.
 

Variables

const uint32_t I2C_STANDARD_MODE {100000}
 Default normal I2C 100KHz speed.
 
const uint32_t I2C_FAST_MODE {400000}
 Fast mode.
 
const uint32_t I2C_FAST_MODE_PLUS_MODE {1000000}
 Really fast mode.
 
const uint32_t I2C_HIGH_SPEED_MODE {3400000}
 Turbo mode.
 
const uint8_t VCNL4010_I2C_ADDRESS {0x13}
 Device address, fixed value.
 
const uint8_t VCNL4010_PRODUCT_VERSION {0x21}
 Current product ID.
 
const uint8_t VCNL4010_I2C_MS_DELAY {200}
 I2C Delay in communications.
 
const uint8_t REGISTER_CMD {0x80}
 Register containing commands.
 
const uint8_t REGISTER_PRODUCT {0x81}
 Register containing product ID.
 
const uint8_t REGISTER_PROXIMITY_RATE {0x82}
 Register containing sampling rate.
 
const uint8_t REGISTER_LED_CURRENT {0x83}
 Register containing IR LED mA.
 
const uint8_t REGISTER_AMBIENT_PARAM {0x84}
 Register containing ambient set.
 
const uint8_t REGISTER_AMBIENT_LIGHT {0x85}
 Register containing ambient data.
 
const uint8_t REGISTER_PROXIMITY {0x87}
 Register containing Proximity.
 
const uint8_t REGISTER_INTERRUPT {0x89}
 Register containing Interrupts.
 
const uint8_t REGISTER_LOW_THRESH_MSB {0x8A}
 MSB of low threshold value.
 
const uint8_t REGISTER_LOW_THRESH_LSB {0x8B}
 LSB of low threshold value.
 
const uint8_t REGISTER_HIGH_THRESH_MSB {0x8C}
 MSB of high threshold value.
 
const uint8_t REGISTER_HIGH_THRESH_LSB {0x8D}
 LSB of high threshold value.
 
const uint8_t REGISTER_INTERRUPT_STATUS {0x8E}
 Interrupt status register.
 
const uint8_t REGISTER_PROXIMITY_TIMING {0x8F}
 Register containing ProxTiming.
 
const uint8_t BIT_ALS_DATA_RDY {6}
 ALS data ready bit.
 
const uint8_t BIT_PROX_DATA_RDY {5}
 PROX data ready bit.
 
const uint8_t BIT_ALS_OD {4}
 start On-Demand ALS reading bit
 
const uint8_t BIT_PROX_OD {3}
 start On-Demand PROX reading bit
 
const uint8_t BIT_ALS_EN {2}
 enable periodic ALS reading bit
 
const uint8_t BIT_PROX_EN {1}
 enable periodic PROX reading bit
 
const uint8_t BIT_SELFTIMED_EN {0}
 enable periodic (self-timed) reading bit