also, to avoid the problem of ambient light, what i do is take a first reading, use a mosfet to turn on the emitter, take 2nd reading, turn off emitter, then compare the two readings for percentage difference