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
TemperatureRead/TemperatureRead.h@17:c9ce210f6654, 2014-10-25 (annotated)
- Committer:
- pspatel321
- Date:
- Sat Oct 25 03:28:55 2014 +0000
- Revision:
- 17:c9ce210f6654
Parth's edits for 10/24/14, items remaining: DC-DC, XBee, reading AMS/IMD error, main code
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| pspatel321 | 17:c9ce210f6654 | 1 | #ifndef _TEMPERATURE_READ_H |
| pspatel321 | 17:c9ce210f6654 | 2 | #define _TEMPERATURE_READ_H |
| pspatel321 | 17:c9ce210f6654 | 3 | |
| pspatel321 | 17:c9ce210f6654 | 4 | // Look up table for temperatures from the GLV Battery Charge Regulator MOSFET internal to the rear accy. box |
| pspatel321 | 17:c9ce210f6654 | 5 | const struct TempTable NXFT15XH103_Table { |
| pspatel321 | 17:c9ce210f6654 | 6 | 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}; |
| pspatel321 | 17:c9ce210f6654 | 7 | 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}; |
| pspatel321 | 17:c9ce210f6654 | 8 | int numEntries = sizeof(input)/sizeof(input[0]); |
| pspatel321 | 17:c9ce210f6654 | 9 | }; |
| pspatel321 | 17:c9ce210f6654 | 10 | |
| pspatel321 | 17:c9ce210f6654 | 11 | class TemperatureRead { |
| pspatel321 | 17:c9ce210f6654 | 12 | public: |
| pspatel321 | 17:c9ce210f6654 | 13 | TemperatureRead(PinName pin, const struct TempTable _table); |
| pspatel321 | 17:c9ce210f6654 | 14 | TemperatureRead(struct TempTable _table) |
| pspatel321 | 17:c9ce210f6654 | 15 | float convert(float in); |
| pspatel321 | 17:c9ce210f6654 | 16 | float temperature; |
| pspatel321 | 17:c9ce210f6654 | 17 | |
| pspatel321 | 17:c9ce210f6654 | 18 | private: |
| pspatel321 | 17:c9ce210f6654 | 19 | AnalogIn ana; |
| pspatel321 | 17:c9ce210f6654 | 20 | bool usingAna; |
| pspatel321 | 17:c9ce210f6654 | 21 | struct TempTable table; |
| pspatel321 | 17:c9ce210f6654 | 22 | }; |
| pspatel321 | 17:c9ce210f6654 | 23 | |
| pspatel321 | 17:c9ce210f6654 | 24 | #endif /*_TEMPERATURE_READ_*/ |
