How to read a text file line by line I am making an LED controller that reads instructions from a text file on my computer. I need to get the arduino to read this text file line by line and put each line into the appropriate variables. I'm using a sparkfun pro micro which is a knock off arduino pro micro. The pro micro is connected via USB

I've seen people use the SD library, but I don't know if this will work for my situation because I am reading directly from the computer and not an SD card. Is this the correct approach, or is there an additional/alternate library that I need to use?
What you can do is:


Read character by character and copy it to a temporary buffer of the maximum length of one line.
When you parsed an end of line symbol, you start parsing the (complete) line in the buffer.
In this line parsing (preferably a separate function), you parse the line, using string to type conversion functions, like atoi (string to an inter) etc. Also you can use the C function strtok to split the string based on a symbol (e.g. comma).
After parsing the line, clear the buffer (you already processed it), and continue filling the buffer again until it is full.
Don't forget to check for end of file.