Auto serial baudrate detector/selector

Rob;

Thanks for the ideas. I did just add the serial.flush after detection as it can't hurt. I also added a simple character echo function in the loop() section, just for grins.

So far, using a 'U' character as the detection signal I haven't seen a false rate detection yet. A 'U' has no double or greater zero bits in a row so I'm sure that is why it's been stable so far. A new line character has also been OK. Later I will research some worst case characters to see if I can force a false speed detection.

I also want to play around with having a continuous data stream already being sent to the arduino prior to even starting it's sketch to see how bad that will effect it. My brey terminal monitor can send from a test file so I will see how that works with this auto detect scheme. Later I may play around with a read multiple bit widths and pick the shortest feature. Not sure how many widths would be a good trade off from a how many characters needed to be read Vs statistical probability of not finding the shortest one.

Stemmer:

Is that TellyMate source written in C or assembly? I think that the Arduino pulseIn() function works in a similar manner if you look at the source code from the arduino core library.

Lefty