Idle thinking about SPI daisy chains.

travis_farmer:
the copy of my "Serial ring" that i found was heavy on the use of the String object. i had a working version at some point that transferred bytes, but i can't find it.
essentially, it was a leading byte to identify the start of a block, a byte for the sender address, then the receiver address, followed by the data, and a terminator byte. it worked great, if all the Arduinos booted at the exact same time. i didn't have any error correction built in, or even a checksum.

though, in thinking now on it, i may revisit the idea, simply out of curiosity if i can improve it.

~Travis

Start by ditching the use of String and use char array instead. Arduino Serial has 64 byte input and output buffers already so you don't need to replicate those, just read and write to Serial but never let a buffer fill!

At 115200 baud you have 1388 cpu cycles between arriving chars. The more you can process your data char by char as it comes in, the faster the process will be done. It may be done before the next char arrives.
If you buffer then process, 'then' doesn't start until the last char arrives and there may be times when it has to be that way but I find it often is not.

I have a keyword match system that uses small code and RAM but could use a big chunk of flash if the keywords are long. It's fast enough to keep up with 250000 baud but it's a bit complicated to use, there's a sketch that takes a word list and generates Arduino source to make tables in flash for the new sketch that uses the match() function to parse text commands.

Still it shows that an Uno can read a serial char and trace down if it matches any of the choices in the list links and print debug text before the next char shows up in 40 microseconds (640 cpu cycles) --- my test pushed that hard btw --- it shows that you can do a good bit of processing in between serial arrivals if you put your head to it and do a bit of trial and error coding.

The whole thing seems beyond most people here. I could make something that stores the list and offsets in EEPROM but that would limit the list severely to 256 chars including null terminators. With short words, maybe 40 or so.