It would give a square wave and I am confined to the analog inputs.
I should have included that the pulse (time) varies significantly for both the pulse and the void between pulses. That would imply, to me, that using a timer to capture the signal wouldn't work. I think I was hoping that the analog inputs could detect a rising or falling signal, or maybe a significant change in signal. I am getting close to full scale signal deflection. Both rise and fall or change could be counted in both directions.
Wawa I've used the digital conversion and have either a 0 or a 1 to work with. The next step is, because the train might be changing speed and the Arduino's sampling rate is fast, to capture the change of the signal from 1 to 0 as each car enters the sensor then from 0 to 1 as it leaves. I've got the programming pretty well solved but would appreciate some hints for a more elegant solution and/or a second opinion.
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16