The amplified photodiode (OPT101) is used in dual-supply mode with a transimpedance gain of -1 V/A. The output 𝑉 1 of the amplified photodiode feeds into a three-stage signal-conditioning circuit that prepares the signal for read-out by the microcontroller's built-in analogue-to-digital converter ADC0 (which accepts input voltages in the range 0 to 3.3 V). The first stage of the conditioning circuit is a feedback-based compensation stage that removes any DC offset in 𝑉 1 due to ambient light or non-ideality of A0, allowing the OPT101 to operate under conditions of high ambient illumination without saturating ADC0. (Note, the compensation circuit treats all frequencies below 16 Hz as DC and hence the modulation frequency must be substantially higher than 16 Hz for a reliable measurement. For the present set-up, we use a fixed modulation frequency of ~410 Hz). The second stage of the conditioning circuit is a summing amplifier (S1) that converts an input signal in the range -1.6 V to +1.6 V into an output signal in the range 0 V to 3.2 V, allowing it to be sampled by ADC0. The third stage is a unity-gain low-pass filter with a cutoff frequency of 94 kHz, slightly less than half the 200-kHz sample rate used by ADC0. The low-pass filter attenuates noise and interferences above the 100-kHz Nyquist frequency of ADC0, preventing sampling artefacts due to aliasing. Further details of the conditioning circuit are provided in the Supporting Information.