I am writing a program in NodeJS which will communicate with my arduino. I\'m using the serialport library. I have written functions to send and receive data from the port.