program for final combination of working pieces
Dependencies: SDFileSystem TMP102 mbed ISL29125
Fork of TEMP_Test by
Diff: SDSave.cpp
- Revision:
- 9:9690da23e8d7
- Parent:
- 8:28f8162d2929
- Child:
- 10:478e0eb37b0d
--- a/SDSave.cpp Thu Mar 31 17:53:11 2016 +0000 +++ b/SDSave.cpp Sun Apr 03 21:51:02 2016 +0000 @@ -9,20 +9,12 @@ if (fp == NULL) { pc.printf("Failed to open the file.\n\r"); } - fprintf(fp, "Time (s)\t temperature (c)\t UV (mW/cm2)\t red (mW/cm2)\t green (mW/cm2)\t blue (mW/cm2)\n\r"); + fprintf(fp, "Time (s)\t temperature outside (c)\t inside (c) \t on panel (c) \t Voltage of Panels (V) \t UV (mW/cm2)\t red (mW/cm2)\t green (mW/cm2)\t blue (mW/cm2)\n\r"); } -void createDataFile_testTEMP() { - fp = fopen("/fs/dataLog.txt", "a");// open file and prepare to write - if (fp == NULL) { - pc.printf("Failed to open the file.\n\r"); - } - fprintf(fp, "Time (s)\t outside (C)\t inside (C)\t On Panel (C)\n\r"); -} - -void writeData(uint16_t time, float outside, float inside, float panel, float Solar, float UV) { +void writeData( float time, float outside, float inside, float panel, float Solar, float UV, uint16_t red, uint16_t green, uint16_t blue) { //output values for each - fprintf(fp, "temp ouside = %.2f (c) \t inside = %.2f (c) \t on panel = %.2f (c) \t solar volage = %.2f (V) \t UV light =%.2f \n\r", time, outside, inside, panel, Solar, UV); + fprintf(fp, "temp ouside = %.2f (c) \t inside = %.2f (c) \t on panel = %.2f (c) \t solar volage = %.2f (V) \t UV light =%.2f \n\r", time, outside, inside, panel, Solar, UV, red, green, blue); } void closeDataFile() {