Generating a txt file

25 Oct 2016

Hello, I'm using a Seeed tiny ble and I would like to generate a txt or csv file. I've been searching and I've read something about LocalFileSystem and I tried it, but it doesn't work. It throw me the next error:

Error: Identifier "LocalFileSystem" is undefined in "main.cpp", Line: 3, Col: 2

with that code:

  1. include "mbed.h"

LocalFileSystem local("local"); Create the local filesystem under the name "local"

int main() { FILE *fp = fopen("/local/out.txt", "w"); Open "out.txt" on the local file system for writing fprintf(fp, "Hello World!"); fclose(fp); }

I want it to generate a file with the readings of the IMU6050. Can anybody help me?

Thank you

26 Oct 2016

LocalFileSystem isn't supported on that board. As fas as I know it only works on the original couple of mbeds hat had extra external flash.

If you need to write to a file you normally need to add an SD card socket connected to an SPI bus and then you can use that to save a file using the SDFileSystem library