Adding latest code to write to serial without problem with garbage chars