Jul 16, 2016 - I am just a guy that would like to do faster serial communication from. The Arduino serial library only use a 64 bytes buffer and I think this is.
Although this post is not so young anymore, I decided to log in just to say thank you for your brilliant contribution. Your EasyTransfer library is truly helpful in many ways and it just saved me important time as I connected six ATMEGA328 microcontrollers together through the I2C bus in order for them to share relevant amounts of data with each other.
For the time being, all I can say is that I cannot thank you enough for your thoughtfulness, for your generosity, and for your inspiring creativity. More so, just as youngsters say nowadays, you are truly the man! Thank you Mr. Now, on a parallel line of thought, and as a merely poor-strive to help others in using your clever library, I’d like to share my experience when I was striving to send 18 floating-point variables from the master to one of the other five slaves within my arrange. Cannondale frame size guide. Taking into consideration that each floating number is comprised of 4 bytes, it is correct to say that I was striving to send a data package at least 72 bytes long.
As you already know, under normal circumstances and unmodified libraries on any kind within the Arduino realm, the maximum size for the data stream to share via the I2C bus is normally limited to 28 bytes per each data-sharing object created through your library and, beyond that, things just get “blank” for the microcontrollers and “nasty” for whoever needs a broader communications’ width-band. After a “fortunate” analysis, just to frame my sad situation within the words’ domain, and after the dust of my deep disappointment settled down, I undertook the challenge of writing down my own communications protocol. That way, after the initial cursing episode gave in, I began by deciphering, not to say “by striving to understand” the “wire” library, in a modest attempt to use it as the foundation for whatever code I could come up with. To my surprise, I did not need to go far on this matter, for I noticed right from the start, that the “wire” library sets 32 bytes-long data-buffers to deal with whatever it needs to deal when it is summoned to work. It turned out that the window of opportunity was not shut to me after all and, to get my feet wet, so to speak, I began by changing the “wire” library’s buffers’ sizes to accommodate things for my particular needs.
As I ran my sketch once more, your outstanding code took care of the rest, and the six microcontrollers were now exchanging data related to 18 floating point variables! Evidently, the larger buffers’ sizes within the “wire” library yielded in larger memory demands for the microcontrollers; nevertheless, the changes work seamless for as long as I do not exceed the controllers’ memory capacities and for as long as I leave enough dynamic memory left for them to function properly. Once again, thank you very much Mr.
I would like to try your softEasyTransfer using some cheap “RS485”-boards from Ebay. However, I need to use pins 3, 4, 6 as direction control, serial receive and serial transmit, respectively.
Where in the code do I specify that? A short explanation of how I do it in my most recent code: When using SoftwareSerial I specify these pins when I start the library: //SoftwareSerial RS485Serial(SSerialRX, SSerialTX); SoftwareSerial RS485Serial(4,6); And I enable or disable the transmit by setting pin 3 (direction control) to high or low //digitalWrite(SSerialTxControl, RS485Transmit); // Enable RS485 Transmit digitalWrite(3, HIGH); Thanks for a superb and FREE code!