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: mbed CANBuffer Watchdog MODSERIAL mbed-rtos xbeeRelay IAP
Fork of SystemManagement by
Diff: TemperatureRead/TemperatureRead.h
- Revision:
- 17:c9ce210f6654
diff -r a72ffe7d879d -r c9ce210f6654 TemperatureRead/TemperatureRead.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/TemperatureRead/TemperatureRead.h Sat Oct 25 03:28:55 2014 +0000
@@ -0,0 +1,24 @@
+#ifndef _TEMPERATURE_READ_H
+#define _TEMPERATURE_READ_H
+
+// Look up table for temperatures from the GLV Battery Charge Regulator MOSFET internal to the rear accy. box
+const struct TempTable NXFT15XH103_Table {
+ float input[] = {0.951781202,0.937262775,0.919578592,0.898354357,0.873281379,0.844154225,0.810924767,0.77373518,0.732941648,0.689103062,0.642984648,0.595469256,0.547490837,0.5,0.453820525,0.409646378,0.368048534,0.329354168,0.293785311,0.261393013,0.232186732,0.205908044,0.182539034,0.161706765,0.143322197,0.127018769,0.112688554,0.100071994,0.088921283,0.079189687,0.07054559,0.06305631,0.056425741,0.050512723};
+ float ouput[] = {-40,-35,-30,-25,-20,-15,-10,-5,0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105,110,115,120,125};
+ int numEntries = sizeof(input)/sizeof(input[0]);
+};
+
+class TemperatureRead {
+public:
+ TemperatureRead(PinName pin, const struct TempTable _table);
+ TemperatureRead(struct TempTable _table)
+ float convert(float in);
+ float temperature;
+
+private:
+ AnalogIn ana;
+ bool usingAna;
+ struct TempTable table;
+};
+
+#endif /*_TEMPERATURE_READ_*/
\ No newline at end of file
