I am very close to the solution, something is missing
my file is here:
The script created the file in the SD card, but size = 0
see my script: (do you see somthing wrong?)
INIT:
ONCHANGE "DI2", "GOTO WriteLog" REM IF di changes go to WriteLog
NOTE: REM denotes a comment. It does not control anything programmatic and is merely there for informational purposes.
fileName$ = "TESTFILE.CSV"
//PRINT fileName
i% = 1 REM - This INTEGER value controls the interval of our logging.
TSET 1,1 //i% REM - Begin a 1 second interval timer.
ONTIMER 1, "GOTO WriteRecord"
END
WriteLog:
IF DI2@ = 1 THEN
SETSYS INF, "LOAD"
SDCardSize$ = GETSYS INF, "SDExtFree"
SDCardSize_Int% = Val SDCardSize$
IF SDCardSize_Int% > 5000 THEN // 5 MB remains
yourFilename$ = "TESTFILE.csv"
EBD_STRING$ = "$dtUF$uf" + yourFilename$
TESTFILESD$ = "/usr/sdext/TESTFILESD.csv"
WRITEEBD EBD_STRING$, TESTFILESD$
ActionID% = GETSYS Prg, "ACTIONID"
ELSE
LOGEVENT "EUM Card full or not present", -1
ENDIF
ENDIF