Thanks, I originally wrote the sketch for the M5Sstack and it worked fine on that. I have increased the buffer size to 20 and it works now on my Arduino Uno. Is that an acceptable workaround or could it cause problems later?
I will look up snprintf() as I've never used it before.