When [Bill Porter] works on a project, he says that he typically writes his own NMEA standard communications protocols to fit the job at hand. While it makes things easy to troubleshoot, he admits that his custom protocols are wasteful of both processor time and bandwidth. Binary communications on the other hand are more efficient, but a bit trickier to manage.
To make things easy for the common user, he wrote a library called EasyTransfer which abstracts packetized serial communications between two Arduino boards. The process is pretty simple – all one has to do is define a data structure on both Arduino boards so that they know what sort of data is coming over the wire, and EasyTransfer handles the rest. This allows users to worry less about communications protocols or transmission errors, and focus on their projects instead.
If you’re working on a project and searching for an easy way to get a pair of Arduinos talking, swing by his site and grab the library. It doesn’t get much easier.
12 thoughts on “Library Makes Arduino To Arduino Serial Communications Dead Simple”
Thanks for the post Mike, though I really didn’t think this warranted a full post, I was only hoping to be in the next ‘Arduino Moment’ combo article.
I wrote this in a day as a way to help out the handful of people that email me asking for help getting one Arduino with a PS2 controller (using my other library) to talk to the other. It’s a simple library with not much to it.
Most Arduino user will undoubtedly know how to handle communications. This library is nothing special; it was targeted for the extreme beginner with no idea how to begin.
Will this work with multiple Arduinos (i.e. 6) ? What connections need to be wired up?
I am a beginner.
“What’s better than one Arduino?” they must have thought.
How you guys compare this with VirtualWire library ? RF modules nowadays are deadly cheap, is it better when you can use two Arduinos in distance and still be able to communicate to each other ?
details() function is missing!
details() is not a function but a macro located in the .h file. Are you having trouble compiling?
Who’s comparing? VirtualWire is for a different purpose, using ASK radios. This is for using UARTS to communicate.
“details() function is missing!”
Sorry my fault.
If you are trying out the library let me know what you think of it. I’ve only had one non-expert person try it so far and give me feedback. If this really does prove useful I will try to add some features.
what about communication through rf module 434Mhz
How long can the cables between the arduinos be before communiction is no longer possible?
I’ve been tearing my hair out trying to make 2 Arduinos talk.
This is just what I needed – thanks, Bill and yes, please add more features!
Anyone interested in doing Arduino to Arduino serial communication, check out this library that handles all of the difficult parsing for you (it even includes delimiting, Consistent Overhead Byte Stuffing (COBS), and Cyclic Redundancy Checking (CRC)): https://github.com/PowerBroker2/SerialTransfer
Please be kind and respectful to help make the comments section excellent. (Comment Policy)