An electronic device may include an optical source capable of supplying light to an adjacent user's body part having blood flow therein and an optical sensor capable of sensing light from the user's body part. The electronic device may also include at least one gain stage coupled to the optical sensor and a compensation circuit coupled to the at least one gain stage and capable of generating a compensated output signal. The compensation circuit may include a memory capable of storing ambient light compensation data, and a digital-to-analog converter (DAC) coupled to the at least one gain stage and capable of compensating for ambient light based upon the stored ambient light compensation data. The electronic device may also include a processor capable of generating a user's heart rate based upon the compensated output signal.