I guess i should have read through the filing system tutorials better!
Here's a solution to this saving it into a .csv file:
#include <SPI.h>
#include <CleO.h>
char STR1[] = "A,B,C,D,E,F,G\n";
char STR2[] = "H,H,H,H,H,H,H\n";
char STR3[] = "I,I,I,I,I,I,I\n";
int16_t actual;
int16_t f;
uint32_t pointer = 0;
void setup() {
CleO.begin();
f = CleO.FOpen("test.csv", FILE_OPEN_ALWAYS | FILE_WRITE);
while (!CleO.FEOF(f)) { // Moves pointer position through the file until end of file is found
CleO.FSeek(f, pointer);
pointer++;
}
CleO.FWrite(f, strlen(STR1) + 1, (uint8_t*)STR1, actual);
CleO.FClose(f);
CleO.FOpen("test.csv", FILE_OPEN_ALWAYS | FILE_WRITE);
while (!CleO.FEOF(f)) {
CleO.FSeek(f, pointer);
pointer++;
}
CleO.FWrite(f, strlen(STR2) + 1, (uint8_t*)STR2, actual);
CleO.FClose(f);
CleO.FOpen("test.csv", FILE_OPEN_ALWAYS | FILE_WRITE);
while (!CleO.FEOF(f)) {
CleO.FSeek(f, pointer);
pointer++;
}
CleO.FWrite(f, strlen(STR3) + 1, (uint8_t*)STR3, actual);
CleO.FClose(f);
}
void loop() {}