Getting integer data from a txt file

Hello Everyone

I am currently doing a project which uses the data from txt file of the SD card. The keyword reads the data as char as one by one. But the data stored in text file is numeric. Can anyone suggest a method to get numeric data from the character array.

EG; TXT file: 121 133 144 222…

You should read the input and store it in a char buffer until you meet a separator (a space in your case), terminate the buffer with null char (0x0), and after use the atoi or atol function to convert it to an integer (or long).

Ciao, Ale.