how to calculate heart rate and spo2 from maxrefdes117

the same sample from github