Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Reading 2 files from $DISK at the program start
Hi Technomaker, and thanks for your quick reply.
You have perfectly understood.
Of course, these files are opened again for writing (and closed) along the sketch when the values have to be changed (Temp and /or Time).
As you can see in my first post, I have opened temp.txt for reading, read, and close in the setup.
If I add the same for the file time.txt , like this :



the in the loop being written like this :

int c;
 while ((c = > '\n') Msg += (char) c;
 if (c == '\n')
   Msg = "";   }

the response is only the content of the first file (temp.txt) as shown hereunder :

$FILE0:OPEN: 29 bytes

note : the characters "Temp" are also stored in head of values, in order to check if we read the right file.

Questions : why the content of the time.txt is not returned as a second line or something like ??
Must I append both files in one ? Ihave tried that, but with 57 bytes, the file does not be written (also strange...)

uupppsss... I have not noticed that you ask for writing also the "...while ((c = > '\n') Msg += (char) c;... in the setup.

I did not that, because i thought that the setup is read only once, and the "while" loop needs as many loops as amount of characters to read... no ????

Messages In This Thread
RE: Reading 2 files from $DISK at the program start - by jackjean - 07-04-2017, 04:04 PM

Forum Jump:

Users browsing this thread: 1 Guest(s)