Check out my new library for creating a simple communication protocol for a UART interface. I use byte packages for data transfer and I found this library very useful in my projects.
Thanks for the tutorial! Perhaps you can can help me with my problem:
I want to do the same thing like shown in this tutorial but without HEADER, HEAD and CHECKSUM node. Just sending three bytes and receiving three bytes. I tried to modificate the examples in xod/uart but it was not working at all. A modification of this example was also not possible when I left the HEAD-pin blank.
Any help is apreciated. Thanks in advance!
I don’t know why my previous projects did not work. I used two Nanos; one for sending and one for receiving. Now I used three write-byte nodes how you suggested and a Serial-to-USB Converter as receiver. This will work for me and I have immediate control of the result on my terminal software. Next step is the other way round: I will use three receive-byte nodes and send some bytes from the terminal program.
I think we are all here to help each other out & none of the code is copy-writed, so re-use should not be a problem. The biggest question is how best to reuse it.
The “best” way is probably just to include the node & note that your library depends on the additional library, but that dependency is going to be annoying for everyone trying to use your library if it is only using a single node.
You can also duplicate the node in your own library; ideally adding comment indicating where you found the code originally. This means you will not get updates for bug fixes (or changes in functionality that might break your code). Copying many nodes from another library rather than just depending on the additional library would probably be bad form…
My plan was just to copy the byte >> packet. And packet nodes (or at least parts of their internal code)
It was not a wholesale copy of all nodes given the header structure is different… But the byte to packet node did provide an easy way to input 1 to 8 bytes into the data packet of a canbus message