![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
program for final combination of working pieces
Dependencies: SDFileSystem TMP102 mbed ISL29125
Fork of TEMP_Test by
Diff: TEMPSensor.cpp
- Revision:
- 13:906a647d7bd1
- Parent:
- 8:28f8162d2929
--- 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