added condtion to check if aruino server is connected otnow