KY039 Arduino Heart rate code

The connections to the sensor look right in the picture but I cannot see a resistor for that other LED. I know that you are not using it in this project, but it looks wrong to me just connected to two Arduino pins.

Yes, I meant that you should put the sensor in the dark and try reading it.