Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get the pulse timings from any send function. Send a free sequence of pulses with custom timings. #146

Open
Martin-Laclaustra opened this issue May 18, 2017 · 0 comments

Comments

@Martin-Laclaustra
Copy link

The library could provide the raw timings that any send function produces. These could be used to create compact code when an embedded application does not need to link the full library but only send a fixed code. Also, when creating new protocols or testing platforms, receivers, and transmitters, they could be used to compare the intended send timings with the received timings or the actually emitted ones, and calibrate corrections. In addition the timings could be used to broadcast through other means different from the output pin.
On the other hand, it would be convenient to be able to send a free sequence of pulses with custom timing (i.e. replay the above codes, or any set of timings recorded by any other mean). Combining this with a restriction-free scanner like SimpleRcScanner may provide the often requested record and play function for the library.

This can be achieved with very few lines of code. I implemented these functions on the transmittimingsarray branch.
The implementation includes an array pointer as member of the class. When null, everything works as usual. When points to an array, any send function saves the timings to that array instead of sending the values to the output pin. The array is zero-terminated. The calling program is responsible for memory allocation. The first timing is always for a low signal.
I tested it with Raspberry pi, with the code I wrote in accesstotransmittimings branch of 433Utils. In short, generatetimings works as codesend but prints the timings instead of sending them. They can be easily visualized, for example in Suat's online visualizer. And sendtimings transmits a quoted string of space-separated timings, considering the first timing always as low signal.
I will be testing this with Arduino next, and prepare equivalent sketches.
Let me know if you see possible to merge this code and I will issue a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant