void loop(){
Serial.readBytes(buf, 3);
"readBytes" returns an important item of information, but you discard it.
Why?
See reply #4.
buf[i] = NULL;
NULL != '\0'
If you're going to squeeze a pointer into a "char", it is usually polite to tell the compiler it's a legitimate thing to do.
Or, better still, don't do it at all.
See reply #4
In a simple code like this, the time I take to type the characters does not matter.
It's nothing to do with the complexity, or otherwise, of your code, it is simply how the serial monitor works.