Skip to content

Commit 5eac2fb

Browse files
committed
comments
1 parent e8aa9d6 commit 5eac2fb

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,10 @@ Examples directory shows:
160160
* [how to handle unsigned types](https://github.com/michalmonday/CSV-Parser-for-Arduino/tree/master/examples/unsigned_values)
161161
* [how to supply csv by incomplete parts](https://github.com/michalmonday/CSV-Parser-for-Arduino/tree/master/examples/supplying_csv_by_incomplete_parts)
162162
* [how to read csv file from a PC (using provided python script)](https://github.com/michalmonday/CSV-Parser-for-Arduino/tree/master/examples/reading_from_computer_python)
163+
* [how to read csv file from a PC row by row (using provided python script, without storing the whole csv in memory)](./examples/reading_from_computer_python_row_by_row)
163164
* [how to read csv file from SD card](https://github.com/michalmonday/CSV-Parser-for-Arduino/tree/master/examples/reading_from_sd_card)
165+
* [how to parse csv row by row (without storing the whole csv in memory)](./examples/parsing_row_by_row/)
166+
* [how to parse csv row by row from SD card (without storing the whole csv in memory)](./examples/parsing_row_by_row_sd_card/)
164167

165168

166169

examples/reading_from_computer_python_row_by_row/reading_from_computer_python_row_by_row.ino

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,11 @@ Note: I suggest to close Serial Monitor window (if it's open) before running the
6060
otherwise the port may be busy.
6161
*/
6262

63+
6364
unsigned long last_start_time = 0;
6465
bool all_file_received = false;
6566
const int TIMEOUT = 1000; // 1 second
67+
// This function is responsible for supplying characters to be parsed.
6668
char feedRowParser() {
6769
// wait indefinitely but only if no characters were received yet
6870
// (if some characters were received, then wait for the TIMEOUT period)
@@ -79,6 +81,9 @@ char feedRowParser() {
7981

8082
}
8183

84+
// This function must return true when the whole CSV file was supplied
85+
// to feedRowParser() function. It will make sure that cp.parseRow()
86+
// returns false when the end of CSV was reached.
8287
bool rowParserFinished() {
8388
return all_file_received;
8489
}

0 commit comments

Comments
 (0)