Hello there......
I have a little project here that takes in a pulse train, whose duty cycle varies from 0 to 100% and I am converting it to 0-10vdc using an UNO and a DAC. Its all working great except for the problem of detecting when teh input is at a logic low (0%), or logic high(100%) pont. Everything between those two works like a charm.
But I need to be able to know if the line is at one extreme, or teh other.
So, I read up on PulseIn() here:
https://www.arduino.cc/reference...
And from what I gather, this function needs to see a transition...fair enough.
I was looking at this example:
https://create.arduino.cc/projec...
But it makes no mention of what happens when you hit the endpoints.
I suppose I could have some code that checks the state of the pin when the PulseIn() function returns '0'
Anyone have a better idea?
Jim