Online Heart Rate Monitor Using NodeMCU and Cayenne

you are using old cayenne library. have a look at this Adding a New Device using MQTT and first add your device to cayenne.
Next you try to get your heart rate value on your serial monitor without the cayenne code. Once you get the value, add the code for OLED and get it working. If you get both this working you can add the cayenne code and display the value on cayenne dashboard.