A system and method for controlling a light emitting device for an optical sensor based on signal quality and/or power consumption requirements. Drive current and/or integration time is controlled as a function of detected ambient light or signal quality. As the signal quality decreases the drive current or integration time can be adjusted to provide a more usable signal. If after some criteria for reduction, such as “time on” or high signal quality, then the drive current can be decreased.