02/07/15

Dependencies:   mbed

Dependents:   TabbedGUIMbed

Data.cpp

Committer:
aidanPJG
Date:
2015-07-08
Revision:
43:8e154016dd89
Parent:
42:b9055f46cfed
Child:
44:3b45ec49bc44

File content as of revision 43:8e154016dd89:

#include "mbed.h"

LocalFileSystem local("local"); 

void initialise()
{ 
    FILE *fp1 = fopen("/local/Datalog.xls", "a");       // opens or creates fill Datalog, and gives the headings
    fprintf(fp1, " Sensor Name \t Time \n");
    fclose(fp1);
}

void data(int sensor_number, int speed)
{
    printf("it be printing");                 //testing
    
    FILE *fp = fopen("/local/Datalog.xls", "a");       // Open "Datalog
    fprintf(fp, " %d \t %d \n",sensor_number, speed);       //fills the tables with the results
    fclose(fp);
}