A method for detecting light collected by a photodiode, the method comprising: continuously providing a photodiode-generated current generated by the photodiode to a first input of an amplifier while providing a reference signal to a second input of the amplifier and, during the continuously providing of the photodiode-generated current: connecting, for a first detection duration, a second feedback path (1312, 1314) between an amplifier output of the amplifier and the photodiode signal input via a capacitor for collecting, on the capacitor, a first charge that corresponds to an integration of the photodiode-generated current over the first detection duration; after collecting the first charge on the capacitor, disconnecting, for a first idle duration, the second feedback path, and connecting the amplifier output to the photodiode signal input via a first feedback path that excludes the capacitor; after the first idle duration, connecting, for a second detection duration, the second feedback path for collecting, on the capacitor, a second charge that corresponds to an integration of the photodiode-generated current over the second detection duration; after collecting the second charge on the capacitor, disconnecting, for a second idle duration, the second feedback path and connecting the amplifier output to the photodiode signal input via the first feedback path; during the second idle duration, connecting the capacitor to a readout circuitry for sampling, from the capacitor, a first electric signal having a magnitude corresponding to a sum of the first charge and the second charge; and determining, based on the first electric signal, an amount of light impinging on the photodiode during the first detection duration and the second detection duration. connecting, for a first detection duration, a second feedback path (1312, 1314) between an amplifier output of the amplifier and the photodiode signal input via a capacitor for collecting, on the capacitor, a first charge that corresponds to an integration of the photodiode-generated current over the first detection duration; after collecting the first charge on the capacitor, disconnecting, for a first idle duration, the second feedback path, and connecting the amplifier output to the photodiode signal input via a first feedback path that excludes the capacitor; after the first idle duration, connecting, for a second detection duration, the second feedback path for collecting, on the capacitor, a second charge that corresponds to an integration of the photodiode-generated current over the second detection duration; after collecting the second charge on the capacitor, disconnecting, for a second idle duration, the second feedback path and connecting the amplifier output to the photodiode signal input via the first feedback path; during the second idle duration, connecting the capacitor to a readout circuitry for sampling, from the capacitor, a first electric signal having a magnitude corresponding to a sum of the first charge and the second charge; and determining, based on the first electric signal, an amount of light impinging on the photodiode during the first detection duration and the second detection duration.