It should work like this. The fan is off at 50% heart rate or less. When heart rate is 50% or higher, each 1% my HR increases or decreases, the fan's speed will increase/decrease by 2%. It should be at full speed when my HR is 100%. How do I do the PWM, and how do I turn off the fan with pin 4 when my heart rate is less than 50%? Is this possible with the Alta HR as control input?