https://tutorials-raspberrypi.com/raspberry-pi-heartbeat-pulse-measuring/