High_Temp.h 813 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. High_Temp.h
  3. 2014 Copyright (c) Seeed Technology Inc. All right reserved.
  4. Loovee
  5. 2013-4-14
  6. */
  7. #ifndef __HIGH_TEMP_H__
  8. #define __HIGH_TEMP_H__
  9. class HighTemp {
  10. public:
  11. HighTemp(int _pinTmp, int _pinThmc);
  12. float getRoomTmp(); //
  13. float getThmc();
  14. void begin();
  15. private:
  16. int pinRoomTmp; // pin of temperature sensor
  17. int pinThmc; // pin of thermocouple
  18. float tempRoom; // room temperature
  19. float tempThmc; // thermocouple temperature
  20. public:
  21. int getAnalog(int pin);
  22. float K_VtoT(float mV); // K type thermocouple, mv->oC
  23. float getThmcVol(); // get voltage of thmc in mV
  24. };
  25. #endif