code improvement two loops and a buffer >> one loop no buffer

@tbillion, temporarily make all your variables global and see how much memory usage is reported when you compile your program.

Using local variables can make your code nice and neat by restricting scope but it may also result in a need for more SRAM than if you use global variables.

And everybody seems to avoiding the elephant-in-the-room which is on the very first line

void ConvertMsg(String Msg)

It is not a good idea to use the String (capital S) class on an Arduino as it can cause memory corruption in the small memory on an Arduino. Just use cstrings - char arrays terminated with 0.

...R