I made a successful IR signal transmit to the mouse bot. My protocol sends 4 bits now and the receiver program works.
For a one it sends a long on and a short off pulse. For a zero it reverses it with a short on and a long off pulse. Behind the data bit follows a stop mark. The timing of the signal was important. The receiving program measures the on and off pulses. If the on pulse was longer as the off pulse then it's a one bit. The real time of the pulse length is not measured. Only the relative timing is important.
I did take care to make the signal decoder loops stop counting if a threshold value is reached. So the decoding won't wait forever for a signal change if a "false" signal was received.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.