LED blinks at frequency f.
Sensor is closed during waitingPeriod and opened during exposurePeriod to receive light from LED.
Assume that the LED is turned On from the start. How to calculate the effective exposure period of sensor, that is the period when sensor is open and LED is turned On.
(I use Matlab but pseudo code is OK).
Thanks!