Test temperature for the near space lab

Dependencies:   SDFileSystem mbed TEMP_Test

Dependents:   TEMP_Test

Fork of RGB_Test by Jeriah Bankson

Committer:
tdale19
Date:
Thu Mar 31 16:53:11 2016 +0000
Revision:
9:5ad2f7f3100e
Parent:
7:b8647f72947c
Problem with multiple SDFileSystems solved

Who changed what in which revision?

UserRevisionLine numberNew contents of line
tdale19 4:4b67d7667474 1 #include "TEMPSensor.h"
tdale19 4:4b67d7667474 2 #include "mbed.h"
Jeriah 0:547856de255b 3 // The location of the sensor on the FRDM-K64F//
Jeriah 0:547856de255b 4
tdale19 7:b8647f72947c 5 AnalogIn thermometerInside(PTC10);
tdale19 4:4b67d7667474 6 AnalogIn thermometerOutside1(PTB3);
tdale19 4:4b67d7667474 7 AnalogIn thermometerOutside2(PTC11);
tdale19 7:b8647f72947c 8 AnalogIn thermometerPanel(PTB10);
Jeriah 0:547856de255b 9
tdale19 4:4b67d7667474 10 float get_outsideTemp()//function to return temperature readings from outside thermometers not in contact with the panels
tdale19 4:4b67d7667474 11 {
tdale19 7:b8647f72947c 12 float readOne = thermometerOutside1.read();
tdale19 7:b8647f72947c 13 float readTwo = thermometerOutside2.read();
tdale19 7:b8647f72947c 14 float outsideTemp = ( readTwo + readOne ) / 2; //average of two outside thermometer
tdale19 7:b8647f72947c 15 return ( outsideTemp * 100 ); //conversion to celcius
Jeriah 0:547856de255b 16 }
tdale19 4:4b67d7667474 17
tdale19 7:b8647f72947c 18 float get_insideTemp()//function to return data from inside thermometer
tdale19 4:4b67d7667474 19 {
tdale19 4:4b67d7667474 20 float insideTemp = thermometerInside.read(); // onboard in-pod thermometer
tdale19 7:b8647f72947c 21 return ( insideTemp * 100 ) ; //conversion to celcius
tdale19 4:4b67d7667474 22 }
tdale19 4:4b67d7667474 23
tdale19 7:b8647f72947c 24 float get_panelTemp()//function to return data from the thermometer in contact with the solar panels
tdale19 4:4b67d7667474 25 {
tdale19 7:b8647f72947c 26 float panelTemp = thermometerPanel.read(); // on-panel thermometer
tdale19 7:b8647f72947c 27 return ( panelTemp *100 ); // conversion to celcius
tdale19 4:4b67d7667474 28 }