<i>Please give an example of "sertxd" to be sent from picaxe with file name attached </i>
Using "Capture" it should just grab whatever gets sent as per ylp88's example, although it needs a CR or CR+LF at the end ( I recommend the later if code space isn't an issue ) ...
- SERTXD("Test. Test",CR)
- SERTXD("Test. Test",CR,LF)
Using an appropriate SEROUT should also work.
For "Start", with the PICAXE providing the filename, the following <i>should </i> work ...
- SERTXD(">C:\tmp\xyzzy.txt",CR,LF)
- SERTXD("Line 1",CR,LF)
- SERTXD("Line 2",CR,LF)
- SERTXD("<",CR,LF)
- END
I don't have the Programming Editor currently installed, but I recall using "\" in a text string causes some problems. The actual ASCII value of "\" can be used; this is the same as above ...
- SERTXD(">C:",$5C,"tmp",$5C,"xyzzy.txt",CR,LF)
I did change the code to accept "/" in place of "\" to make life easier ...
- SERTXD(">C:/tmp/xyzzy.txt"
but not sure if that made it into the .EXE download available, and I presently have no way of testing it.
If filenames aren't fully specified ( ie no disk drive or folder specified ), I'm not sure where the file ends up ( in, or under, "C:\My Documents" probably ) ...
- SERTXD(">xyxxy.txt",CR,LF)
- SERTXD(">/tmp/xyzzy.txt",CR,LF)
- SERTXD(">tmp/xyzzy.txt",CR,LF)
The output from your program can be checked by using the Programming Editor Terminal window which will show everything sent ( hence the recommendation for CR and LF ). The .EXE only displays lines it has accepted, so ">" lines in "Capture" won't get displayed, and when using "Start" data won't be displayed until the ">" line has been received - One of the areas I was intending to improve upon.