Yet Another WebIOPi+
 All Classes Namespaces Files Functions Variables Macros Pages
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
webiopi.devices.sensor.vcnl4000.VCNL4000 Class Reference
Inheritance diagram for webiopi.devices.sensor.vcnl4000.VCNL4000:
webiopi.devices.i2c.I2C webiopi.devices.sensor.Luminosity webiopi.devices.sensor.Distance webiopi.devices.bus.Bus

Public Member Functions

def __init__
 
def __str__
 
def __family__
 
def __setProximityTiming__
 
def __setAmbientMeasuringMode__
 
def calibrate
 
def setCurrent
 
def getCurrent
 
def setFrequency
 
def getFrequency
 
def __setFrequency__
 
def __getFrequency__
 
def __setCurrent__
 
def __getCurrent__
 
def __getLux__
 
def __calculateLux__
 
def __getMillimeter__
 
def __calculateMillimeter__
 
def __measureOffset__
 
def __readProximityCounts__
 
- Public Member Functions inherited from webiopi.devices.i2c.I2C
def __init__
 
def __str__
 
def readRegister
 
def readRegisters
 
def writeRegister
 
def writeRegisters
 
- Public Member Functions inherited from webiopi.devices.bus.Bus
def __init__
 
def open
 
def close
 
def read
 
def readBytes
 
def readByte
 
def write
 
def writeBytes
 
def writeByte
 
- Public Member Functions inherited from webiopi.devices.sensor.Luminosity
def __family__
 
def __getLux__
 
def getLux
 
- Public Member Functions inherited from webiopi.devices.sensor.Distance
def __family__
 
def __getMillimeter__
 
def getMillimeter
 
def getCentimeter
 
def getMeter
 
def getInch
 
def getFoot
 
def getYard
 

Public Attributes

 prox_threshold
 
 prox_cycles
 
 cal_cycles
 
 offset
 
 current
 
 frequency
 
- Public Attributes inherited from webiopi.devices.i2c.I2C
 channel
 
 slave
 
- Public Attributes inherited from webiopi.devices.bus.Bus
 busName
 
 device
 
 flag
 
 fd
 

Static Public Attributes

int REG_COMMAND = 0x80
 
int REG_IR_LED_CURRENT = 0x83
 
int REG_AMB_PARAMETERS = 0x84
 
int REG_AMB_RESULT_HIGH = 0x85
 
int REG_PROX_RESULT_HIGH = 0x87
 
int REG_PROX_FREQUENCY = 0x89
 
int REG_PROX_ADJUST = 0x8A
 
int VAL_MOD_TIMING_DEF = 129
 
int VAL_PR_FREQ_3M125HZ = 0
 
int VAL_PR_FREQ_1M5625HZ = 1
 
int VAL_PR_FREQ_781K25HZ = 2
 
int VAL_PR_FREQ_390K625HZ = 3
 
int VAL_START_AMB = 1
 
int VAL_START_PROX = 1
 
int VAL_INVALID = -1
 
int VAL_NO_PROXIMITY = -1
 
int MASK_PROX_FREQUENCY = 0
 
int MASK_IR_LED_CURRENT = 0
 
int MASK_PROX_READY = 0
 
int MASK_AMB_READY = 0
 

Detailed Description

Definition at line 28 of file vcnl4000.py.

Constructor & Destructor Documentation

def webiopi.devices.sensor.vcnl4000.VCNL4000.__init__ (   self,
  slave = 0b0010011,
  current = 20,
  frequency = 781,
  prox_threshold = 15,
  prox_cycles = 10,
  cal_cycles = 5 
)

Member Function Documentation

def webiopi.devices.sensor.vcnl4000.VCNL4000.__calculateLux__ (   self,
  light_word 
)
def webiopi.devices.sensor.vcnl4000.VCNL4000.__calculateMillimeter__ (   self,
  raw_proximity_counts 
)
def webiopi.devices.sensor.vcnl4000.VCNL4000.__family__ (   self)

Definition at line 70 of file vcnl4000.py.

def webiopi.devices.sensor.vcnl4000.VCNL4000.__getCurrent__ (   self)
def webiopi.devices.sensor.vcnl4000.VCNL4000.__getFrequency__ (   self)
def webiopi.devices.sensor.vcnl4000.VCNL4000.__getLux__ (   self)
def webiopi.devices.sensor.vcnl4000.VCNL4000.__getMillimeter__ (   self)
def webiopi.devices.sensor.vcnl4000.VCNL4000.__measureOffset__ (   self)
def webiopi.devices.sensor.vcnl4000.VCNL4000.__readProximityCounts__ (   self)
def webiopi.devices.sensor.vcnl4000.VCNL4000.__setAmbientMeasuringMode__ (   self)
def webiopi.devices.sensor.vcnl4000.VCNL4000.__setCurrent__ (   self)
def webiopi.devices.sensor.vcnl4000.VCNL4000.__setFrequency__ (   self)
def webiopi.devices.sensor.vcnl4000.VCNL4000.__setProximityTiming__ (   self)
def webiopi.devices.sensor.vcnl4000.VCNL4000.__str__ (   self)
def webiopi.devices.sensor.vcnl4000.VCNL4000.calibrate (   self)

Definition at line 84 of file vcnl4000.py.

def webiopi.devices.sensor.vcnl4000.VCNL4000.getCurrent (   self)
def webiopi.devices.sensor.vcnl4000.VCNL4000.getFrequency (   self)
def webiopi.devices.sensor.vcnl4000.VCNL4000.setCurrent (   self,
  current 
)

Definition at line 90 of file vcnl4000.py.

Referenced by webiopi.devices.sensor.vcnl4000.VCNL4000.__init__().

def webiopi.devices.sensor.vcnl4000.VCNL4000.setFrequency (   self,
  frequency 
)

Definition at line 98 of file vcnl4000.py.

Referenced by webiopi.devices.sensor.vcnl4000.VCNL4000.__init__().

Member Data Documentation

webiopi.devices.sensor.vcnl4000.VCNL4000.cal_cycles
webiopi.devices.sensor.vcnl4000.VCNL4000.current

Definition at line 91 of file vcnl4000.py.

Referenced by webiopi.devices.sensor.vcnl4000.VCNL4000.__setCurrent__().

webiopi.devices.sensor.vcnl4000.VCNL4000.frequency
int webiopi.devices.sensor.vcnl4000.VCNL4000.MASK_AMB_READY = 0
static

Definition at line 53 of file vcnl4000.py.

Referenced by webiopi.devices.sensor.vcnl4000.VCNL4000.__getLux__().

int webiopi.devices.sensor.vcnl4000.VCNL4000.MASK_IR_LED_CURRENT = 0
static

Definition at line 51 of file vcnl4000.py.

Referenced by webiopi.devices.sensor.vcnl4000.VCNL4000.__getCurrent__().

int webiopi.devices.sensor.vcnl4000.VCNL4000.MASK_PROX_FREQUENCY = 0
static
int webiopi.devices.sensor.vcnl4000.VCNL4000.MASK_PROX_READY = 0
static
webiopi.devices.sensor.vcnl4000.VCNL4000.offset
webiopi.devices.sensor.vcnl4000.VCNL4000.prox_cycles
webiopi.devices.sensor.vcnl4000.VCNL4000.prox_threshold
int webiopi.devices.sensor.vcnl4000.VCNL4000.REG_AMB_PARAMETERS = 0x84
static
int webiopi.devices.sensor.vcnl4000.VCNL4000.REG_AMB_RESULT_HIGH = 0x85
static

Definition at line 32 of file vcnl4000.py.

Referenced by webiopi.devices.sensor.vcnl4000.VCNL4000.__getLux__().

int webiopi.devices.sensor.vcnl4000.VCNL4000.REG_COMMAND = 0x80
static
int webiopi.devices.sensor.vcnl4000.VCNL4000.REG_IR_LED_CURRENT = 0x83
static
int webiopi.devices.sensor.vcnl4000.VCNL4000.REG_PROX_ADJUST = 0x8A
static
int webiopi.devices.sensor.vcnl4000.VCNL4000.REG_PROX_FREQUENCY = 0x89
static
int webiopi.devices.sensor.vcnl4000.VCNL4000.REG_PROX_RESULT_HIGH = 0x87
static
int webiopi.devices.sensor.vcnl4000.VCNL4000.VAL_INVALID = -1
static
int webiopi.devices.sensor.vcnl4000.VCNL4000.VAL_MOD_TIMING_DEF = 129
static
int webiopi.devices.sensor.vcnl4000.VCNL4000.VAL_NO_PROXIMITY = -1
static
int webiopi.devices.sensor.vcnl4000.VCNL4000.VAL_PR_FREQ_1M5625HZ = 1
static
int webiopi.devices.sensor.vcnl4000.VCNL4000.VAL_PR_FREQ_390K625HZ = 3
static
int webiopi.devices.sensor.vcnl4000.VCNL4000.VAL_PR_FREQ_3M125HZ = 0
static
int webiopi.devices.sensor.vcnl4000.VCNL4000.VAL_PR_FREQ_781K25HZ = 2
static
int webiopi.devices.sensor.vcnl4000.VCNL4000.VAL_START_AMB = 1
static

Definition at line 44 of file vcnl4000.py.

Referenced by webiopi.devices.sensor.vcnl4000.VCNL4000.__getLux__().

int webiopi.devices.sensor.vcnl4000.VCNL4000.VAL_START_PROX = 1
static

The documentation for this class was generated from the following file: