Library for using multiple SI1142 sensor
Fork of SI1141 by
Diff: SI1143.cpp
- Revision:
- 7:f1303b85db58
- Parent:
- 5:3fadc61598bc
- Child:
- 8:70933bf445af
--- a/SI1143.cpp Mon Oct 21 20:12:56 2013 +0000 +++ b/SI1143.cpp Wed May 14 19:01:05 2014 +0000 @@ -49,9 +49,12 @@ // Setting up LED Power to full write_reg(HW_KEY,HW_KEY_VAL0); - write_reg(PS_LED21,0xAA); - write_reg(PS_LED3,0x0A); - write_reg(PARAM_WR, ALS_IR_TASK + ALS_VIS_TASK + PS1_TASK + PS2_TASK + PS3_TASK); + write_reg(PS_LED21,0x0F); // Was 0x0A + write_reg(PS_LED3,0x00); + //write_reg(PS_LED21,0xAA); + //write_reg(PS_LED3,0x0A); + //write_reg(PARAM_WR, ALS_IR_TASK + ALS_VIS_TASK + PS1_TASK + PS2_TASK + PS3_TASK); + write_reg(PARAM_WR, ALS_IR_TASK + ALS_VIS_TASK + PS1_TASK); command(PARAM_SET + (CHLIST & 0x1F)); @@ -59,6 +62,9 @@ write_reg(IRQ_ENABLE,0); write_reg(IRQ_MODE1,0); write_reg(IRQ_MODE2,0); + + //write_reg(PS_ADC_MISC,0x24); + //write_reg(PS1_ADCMUX,0x03); } void SI1143::command(char cmd) @@ -112,7 +118,7 @@ void SI1143::bias(int ready, int repeat) { wait(ready); - bias1 = get_ps1(repeat); + bias1 = 0; //get_ps1(repeat); bias2 = get_ps2(repeat); bias3 = get_ps3(repeat); }