heart rate coding

hello

working on a project and i need help on trying to figure out a code that can average heart rate per minute.
please help.

What sensor are you using to get heart rate? What output does it give?

Ah, I've written this algorithm before. It processed a voltage reading every ms or so. Very fun. Yes, please post all about your sensors, etc.

sensors that form an analog signal or source.

I need help developing an equation that helps the program (arduino) figure out how to count the rate from peak to peak

when using an PLC how would I create a program that can tell me when the capacitor is charged and when its discharged ? only using an PLC

What is a PLC?

CrossRoads:
What is a PLC?

Programmable logic controller? Some sort of industrial control?

yes it is the same project. i'm trying to use both the arduino and the PLC. I'm using the ardunio to read the pulse waves and the plc to count the discharge and charge of the capacitors

I figured that out already thanks any way