Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: SDFileSystem TMP102 mbed ISL29125
Fork of TEMP_Test by
Revision 13:906a647d7bd1, committed 2016-04-18
- Comitter:
- tdale19
- Date:
- Mon Apr 18 16:41:40 2016 +0000
- Parent:
- 12:7ed53be0057a
- Commit message:
- Jeriah on Tom's mbed id, fixed the sd save horizontal problem
Changed in this revision
--- a/SDSave.cpp Thu Apr 07 15:46:20 2016 +0000
+++ b/SDSave.cpp Mon Apr 18 16:41:40 2016 +0000
@@ -9,12 +9,12 @@
if (fp == NULL) {
pc.printf("Failed to open the file.\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");
+ fprintf(fp, "Time (s)\t temperature outside (c)\t inside (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 writeData( float time, float outside, float inside, float panel, float Solar, float UV, uint16_t red, uint16_t green, uint16_t blue) {
+void writeData( float time, float outside, float inside, 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 =%.4f \n\r", time, outside, inside, panel, Solar, UV, red, green, blue);
+ fprintf(fp, "%.2f \t %.2f \t %.2f \t %.4f \t %.4f \t %d \t %d \t %d\n\r", time, outside, inside, Solar, UV, red, green, blue);
}
void closeDataFile() {
--- a/SDSave.h Thu Apr 07 15:46:20 2016 +0000 +++ b/SDSave.h Mon Apr 18 16:41:40 2016 +0000 @@ -2,7 +2,7 @@ #define SAVE void createDataFile(); -void writeData( float time, float outside, float inside, float panel, float Solar, float UV, uint16_t red, uint16_t green, uint16_t blue); +void writeData( float time, float outside, float inside, float Solar, float UV, uint16_t red, uint16_t green, uint16_t blue); void closeDataFile(); bool mountSDCard();
--- a/TEMPSensor.cpp Thu Apr 07 15:46:20 2016 +0000
+++ b/TEMPSensor.cpp Mon Apr 18 16:41:40 2016 +0000
@@ -1,16 +1,14 @@
#include "mbed.h"
+#include "TMP102.h"
// The location of the sensor on the FRDM-K64F//
-AnalogIn thermometerInside(PTC10);
-AnalogIn thermometerOutside1(PTB3);
-AnalogIn thermometerOutside2(PTC11);
-AnalogIn thermometerPanel(PTB10);
+AnalogIn thermometerInside(PTB3);
+AnalogIn thermometerOutside(PTB10);
float get_outsideTemp()//function to return temperature readings from outside thermometers not in contact with the panels
{
- float readOne = thermometerOutside1.read();
- float readTwo = thermometerOutside2.read();
- float outsideTemp = ( readTwo + readOne ) / 2; //average of two outside thermometer
+ float readOne = thermometerOutside.read();
+ float outsideTemp = (readOne); //average of two outside thermometer
return ( outsideTemp * 100 ); //conversion to celcius
}
@@ -18,10 +16,4 @@
{
float insideTemp = thermometerInside.read(); // onboard in-pod thermometer
return ( insideTemp * 100 ) ; //conversion to celcius
- }
-
-float get_panelTemp()//function to return data from the thermometer in contact with the solar panels
-{
- float panelTemp = thermometerPanel.read(); // on-panel thermometer
- return ( panelTemp *100 ); // conversion to celcius
-}
\ No newline at end of file
+ }
\ No newline at end of file
--- a/TEMPSensor.h Thu Apr 07 15:46:20 2016 +0000 +++ b/TEMPSensor.h Mon Apr 18 16:41:40 2016 +0000 @@ -5,6 +5,5 @@ float get_outsideTemp();//function declarations for temperature getters in TEMPSensor.cpp float get_insideTemp();//function to return data from inside thermometer -float get_panelTemp();//function to return data from the thermometer in contact with the solar panels #endif
--- a/TEMP_Test.lib Thu Apr 07 15:46:20 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -https://developer.mbed.org/users/tdale19/code/TEMP_Test/#61b76e7dc5b7
--- a/TMP102.lib Thu Apr 07 15:46:20 2016 +0000 +++ b/TMP102.lib Mon Apr 18 16:41:40 2016 +0000 @@ -1,1 +1,1 @@ -https://developer.mbed.org/users/tdale19/code/TEMP_Test/#f93c4ce1f910 +http://mbed.org/users/chris/code/TMP102/#694792b93731
--- a/main.cpp Thu Apr 07 15:46:20 2016 +0000
+++ b/main.cpp Mon Apr 18 16:41:40 2016 +0000
@@ -38,13 +38,13 @@
if (totalTime>(lastTime+interval)) {
lastTime=totalTime;
get_rgb(rgb);
- pc.printf("temp ouside = %.2f (c) inside = %.2f (c) on panel = %.2f (c) solar volage = %.2f (V) UV light =%.4f RGB Values: red = %d green = %d blue = %d\r\n" ,get_outsideTemp(),get_insideTemp(),get_panelTemp(),get_solar(),(get_UV()),rgb[0],rgb[1],rgb[2]);//prints titles and data of Temp readings
- writeData(lastTime,get_outsideTemp(),get_insideTemp(),get_panelTemp(),get_solar(),get_UV(),rgb[0],rgb[1],rgb[2]);//send data to writeData in SDsave.cpp
+ pc.printf("temp ouside = %.2f (c) inside = %.2f (c) solar volage = %.4f (V) UV light =%.4f RGB Values: red = %d green = %d blue = %d\r\n" ,get_outsideTemp(),get_insideTemp(),get_solar(),(get_UV()),rgb[0],rgb[1],rgb[2]);//prints titles and data of Temp readings
+ writeData(lastTime,get_outsideTemp(),get_insideTemp(),get_solar(),get_UV(),rgb[0],rgb[1],rgb[2]);//send data to writeData in SDsave.cpp
}
}
closeDataFile();
- ledBlue = 0;
+ ledBlue = 1;
while (true) {};
}
\ No newline at end of file
