I am trying to save data send from arduino to the raspberry pi by serial communication. I want to get only the first 1000 row save, close and exit. I have tried a lot of cod