uart example improvements