const int LIGHT_DWELL_TIME = 2; // 2-second timer for rapid testing. A more useful time for a sensor light might be 30 seconds. // Variables used to check and control light state int dwellTime; // ...
to sample the Pulse Sensor with consistent and regular timing. The code is setup to read Pulse Sensor signal at 500Hz (every 2mS). The reasoning for this can be found ...