I am trying to read a log file and compare certain values against preset thresholds. My code manages to log the raw data from with the first for
loop in my func
It is not skipping your second loop. You need to seek
the position back. This is because after reading the file, the file offset will be placed at the end of the file, so you will need to put it back at the start. This can be done easily by adding a line
datafile.seek(0);
Before the second loop.
Ref: Documentation