So my problem is in the write function, only the first character is sent.
I tried to change x, y to strings and then use string.c_str() but doesn't work.
I also tried to take input and store them in a string variable, then I copy them to the character array using loop but also it did not work.
How can I write the complete set of characters in the array to the pipe?