my code , you should know i have no idea :-
1, what led pwr to use
2, what led pwidth to use
3, what sample rate to use
4, what sample resolution to use
5, if there are any fifo overflows and if it matters much
6, what led the readings represents
7, how to interpret the data
8, how much data to collect [i assume at least 2 seconds worth]
most of the drivers i've seen over the net are using the following...


1, what led pwr to use : 0x1F about 6.2 mA
2, what led pwidth to use : 411 which is 18 ADC BIT RESOLUTION based on the manual.
3, what sample rate to use : sample rate per second 100

a configuration should also include: sampleAverage = 8

4, what sample resolution to use :
5, if there are any fifo overflows and if it matters much.
6, what led the readings represents. I will search and find out.
7, how to interpret the data....
8, how much data to collect [i assume at least 2 seconds worth]