PiStorms  4.015
PiStorms Library Reference by mindsensors.com
 All Classes Namespaces Files Functions Variables
GroveDevices.Grove_Sunlight_Sensor Class Reference

This class supports the Grove Sunlight Sensor v1.4. More...

Inheritance diagram for GroveDevices.Grove_Sunlight_Sensor:

Public Member Functions

def __init__
 Initialize the class with the i2c address of your sunlight sensor. More...
 
def deInit
 
def reset
 
def writeParamData
 
def readIR
 
def readVisible
 
def readUV
 

Static Public Attributes

int SI114X_SET = 0xA0
 
int SI114X_RESET = 0x01
 
int SI114X_PSALS_AUTO = 0x0F
 
int SI114X_INT_CFG = 0x03
 
int SI114X_IRQ_ENABLE = 0x04
 
int SI114X_IRQ_MODE1 = 0x05
 
int SI114X_IRQ_MODE2 = 0x06
 
int SI114X_HW_KEY = 0x07
 
int SI114X_MEAS_RATE0 = 0x08
 
int SI114X_MEAS_RATE1 = 0x09
 
int SI114X_PS_LED21 = 0x0F
 
int SI114X_UCOEFF0 = 0x13
 
int SI114X_UCOEFF1 = 0x14
 
int SI114X_UCOEFF2 = 0x15
 
int SI114X_UCOEFF3 = 0x16
 
int SI114X_WR = 0x17
 
int SI114X_COMMAND = 0x18
 
int SI114X_IRQ_STATUS = 0x21
 
int SI114X_ALS_VIS_DATA0 = 0x22
 
int SI114X_ALS_IR_DATA0 = 0x24
 
int SI114X_AUX_DATA0_UVINDEX0 = 0x2C
 
int SI114X_RD = 0x2E
 
int SI114X_CHLIST = 0x01
 
int SI114X_CHLIST_ENUV = 0x80
 
int SI114X_CHLIST_ENALSIR = 0x20
 
int SI114X_CHLIST_ENALSVIS = 0x10
 
int SI114X_CHLIST_ENPS1 = 0x01
 
int SI114X_PSLED12_SELECT = 0x02
 
int SI114X_PSLED3_SELECT = 0x03
 
int SI114X_PS1_ADCMUX = 0x07
 
int SI114X_PS_ADC_COUNTER = 0x0A
 
int SI114X_PS_ADC_GAIN = 0x0B
 
int SI114X_PS_ADC_MISC = 0x0C
 
int SI114X_ALS_VIS_ADC_COUNTER = 0x10
 
int SI114X_ALS_VIS_ADC_GAIN = 0x11
 
int SI114X_ALS_VIS_ADC_MISC = 0x12
 
int SI114X_ALS_IR_ADC_COUNTER = 0x1D
 
int SI114X_ALS_IR_ADC_GAIN = 0x1E
 
int SI114X_ALS_IR_ADC_MISC = 0x1F
 
int SI114X_ADCMUX_LARGE_IR = 0x03
 
int SI114X_PSLED12_SELECT_PS1_LED1 = 0x01
 
int SI114X_ADC_GAIN_DIV1 = 0x00
 
int SI114X_LED_CURRENT_22MA = 0x03
 
int SI114X_ADC_COUNTER_511ADCCLK = 0x07
 
int SI114X_ADC_MISC_HIGHRANGE = 0x20
 
int SI114X_ADC_MISC_ADC_RAWADC = 0x04
 
int SI114X_INT_CFG_INTOE = 0x01
 
int SI114X_IRQEN_ALS = 0x01
 

Detailed Description

This class supports the Grove Sunlight Sensor v1.4.

This versatile sensor can read IR, visible, and UV light, all in one convenient package!

Documentation: http://wiki.seeed.cc/Grove-Sunlight_Sensor/

1 import GroveDevices
2 # initialize a sunlight sensor (make sure it is plugged in to the I2C port first)
4 print("I see this {} IR light, {} visible light, and {} UV light.".format(sun.readIR(), sun.readVisible(), sun.readUV()))

Constructor & Destructor Documentation

def GroveDevices.Grove_Sunlight_Sensor.__init__ (   self,
  address = 0x60 
)

Initialize the class with the i2c address of your sunlight sensor.

Parameters
addressAddress of your sunlight sensor
Remarks

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