I have a signal that never drops below 3.1 volts but never goes above 3.5. At 3.1ish volts there is nothing but just a plain bias at play. However, from the 3.2 to 3.5 volt range with in a period of time I recieve 4 pulses. The period of time between these 4 pulses along with the period of between the group of pulses changes.

I know I cannot utilize a digital read due to the no value being biased at 3.1 volts and an actual value being at 3.5. So the next thought is to utilize an analog input. I am not sure how to measure a threshold so that anything above 3.1ish volts triggers an event such at setting a variable to high.

Any suggestions? I am somewhat new at this business.