program for final combination of working pieces
Dependencies: SDFileSystem TMP102 mbed ISL29125
Fork of TEMP_Test by
TEMPSensor.cpp@13:906a647d7bd1, 2016-04-18 (annotated)
- Committer:
- tdale19
- Date:
- Mon Apr 18 16:41:40 2016 +0000
- Revision:
- 13:906a647d7bd1
- Parent:
- 8:28f8162d2929
Jeriah on Tom's mbed id, fixed the sd save horizontal problem
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
tdale19 | 4:4b67d7667474 | 1 | #include "mbed.h" |
tdale19 | 13:906a647d7bd1 | 2 | #include "TMP102.h" |
Jeriah | 0:547856de255b | 3 | // The location of the sensor on the FRDM-K64F// |
Jeriah | 0:547856de255b | 4 | |
tdale19 | 13:906a647d7bd1 | 5 | AnalogIn thermometerInside(PTB3); |
tdale19 | 13:906a647d7bd1 | 6 | AnalogIn thermometerOutside(PTB10); |
Jeriah | 0:547856de255b | 7 | |
tdale19 | 4:4b67d7667474 | 8 | float get_outsideTemp()//function to return temperature readings from outside thermometers not in contact with the panels |
tdale19 | 4:4b67d7667474 | 9 | { |
tdale19 | 13:906a647d7bd1 | 10 | float readOne = thermometerOutside.read(); |
tdale19 | 13:906a647d7bd1 | 11 | float outsideTemp = (readOne); //average of two outside thermometer |
tdale19 | 7:6becc29457ce | 12 | return ( outsideTemp * 100 ); //conversion to celcius |
Jeriah | 0:547856de255b | 13 | } |
tdale19 | 4:4b67d7667474 | 14 | |
tdale19 | 7:6becc29457ce | 15 | float get_insideTemp()//function to return data from inside thermometer |
tdale19 | 4:4b67d7667474 | 16 | { |
tdale19 | 4:4b67d7667474 | 17 | float insideTemp = thermometerInside.read(); // onboard in-pod thermometer |
tdale19 | 7:6becc29457ce | 18 | return ( insideTemp * 100 ) ; //conversion to celcius |
tdale19 | 13:906a647d7bd1 | 19 | } |