The easiest way to write to a file is to redirect output of the PrintfClient (or any other serial port listening utility) to a file. In Linux this is done by using the '>' character or the '>>' for appending to an existing file. For example:
PrintfClient > mylogfile.txt # will create mylogfile.txt and redirect stdout to that file. This should work in Windows / Cygwin as well, but I haven't tested it. Regarding time, it should be trivial to change the PrintfClient so it timestamps the output. Otherwise you can use relative time units from the mote... Thanks --a On Thu, Jun 11, 2009 at 10:59 AM, cristiano carnicelli<[email protected]> wrote: > Hi all. > I was wondering is there a way to write on a file like use fopen() and > fwrite()? > Or is there a way to redirect the printf on a file? > Finally is there a way to get the current time? > > I use tinyos.2.1.0 and telosb > > Regards > _______________________________________________ > Tinyos-help mailing list > [email protected] > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
