martianredskies
Well-known member
i've incorporated this handy commandline library into my teensy 3.6 project as a means of sending serial commands.
https://create.arduino.cc/projecthub/mikefarr/simple-command-line-interface-4f0a3f
To begin, I just wanted to give myself basic file system control of the built-in SD; delete, rename, mkdir, rmdir, copy, read etc.
It works, however copying a file from the SD card to a new file/filename is painfully slow, well over 30seconds for a 32kb file.
The code i am using is;
and example of the sequence i would send to copy a file : abcdefg (*some header) copy (*command) filenameA.dat (*secondWord) filenameB.dat (*thirdWord);
Any help would be appreciated.
https://create.arduino.cc/projecthub/mikefarr/simple-command-line-interface-4f0a3f
To begin, I just wanted to give myself basic file system control of the built-in SD; delete, rename, mkdir, rmdir, copy, read etc.
It works, however copying a file from the SD card to a new file/filename is painfully slow, well over 30seconds for a 32kb file.
The code i am using is;
Code:
//copy file
if (strcmp(result, copyID) == 0){
File myFileIn = SD.open(secondWord, FILE_READ);
File myFileOut = SD.open(thirdWord, FILE_WRITE);
print2("copy file> ", secondWord);
print2("to file> ", thirdWord);
while (myFileIn.available()) {
myFileOut.write(myFileIn.read());
}
myFileIn.close();
myFileOut.close();
commandLineSwitch = 2;
}
and example of the sequence i would send to copy a file : abcdefg (*some header) copy (*command) filenameA.dat (*secondWord) filenameB.dat (*thirdWord);
Any help would be appreciated.