Hi all,
Does anyone have any c code (or super speedy Python?) to read the pulse length of a GPIO input.
I am trying to read demodulated IR pulses, in the order of 1ms - 5ms. The input signal appears as active low and typically goes:
5ms low 'start' bit
1ms high space
8 x data bits (either low 1.5ms or low 2ms) separated by 1ms high space bit
1ms high space
3ms low 'stop' bit
I want to verify the length of the start bit, each of the data bits and the stop bit in an accurate way. I have a python code dealing with the transmit side of my IR link(utilising pigpio) but cannot get an accurate read of the received signal. I have experimented with trying to get the python code to call a c script, but I am struggling (I am not very competent in C)!
I am running Raspian on a pi B+.
Any thoughts / examples are appreciated!