Patent ID: 8773336

Claim:
A device, comprising: at least a first LED and a second LED, wherein the first and second LEDs are configured to emit different wavelength light from each other; a controller configured to drive the first LED to emit light during a first time period when the second LED does not emit light, and to drive the second LED to emit light during a second time period when the first LED does not emit light; and a light detector configured to detect an intensity of light produced by the first LED during the first time period and to detect an intensity of light produced by the second LED during the second time period; wherein the controller is further configured to use the light detector to measure a temperature of the device by; supplying two different currents to the light detector during a third time period when the first and second LEDs are not emitting light; and measuring a difference between voltages developed across the light detector when supplied with the two different currents, wherein the difference in the voltages is proportion to the temperature; and wherein the controller is further configured to use a ratio of signals induced in the light detector by the first and second LEDs during the first and second time periods and the temperature measured during the third time period to adjust the intensity of light produced by at least one of the LEDs.