BrickUp API Service for Docker version.

High_Temp.h 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. High_Temp.h
  3. 2014 Copyright (c) Seeed Technology Inc. All right reserved.
  4. Loovee
  5. 2013-4-14
  6. This library is free software; you can redistribute it and/or
  7. modify it under the terms of the GNU Lesser General Public
  8. License as published by the Free Software Foundation; either
  9. version 2.1 of the License, or (at your option) any later version.
  10. This library is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. Lesser General Public License for more details.
  14. You should have received a copy of the GNU Lesser General Public
  15. License along with this library; if not, write to the Free Software
  16. Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  17. */
  18. #ifndef __HIGH_TEMP_H__
  19. #define __HIGH_TEMP_H__
  20. class HighTemp{
  21. public:
  22. HighTemp(int _pinTmp, int _pinThmc);
  23. float getRoomTmp(); //
  24. float getThmc();
  25. void begin();
  26. private:
  27. int pinRoomTmp; // pin of temperature sensor
  28. int pinThmc; // pin of thermocouple
  29. float tempRoom; // room temperature
  30. float tempThmc; // thermocouple temperature
  31. public:
  32. int getAnalog(int pin);
  33. float K_VtoT(float mV); // K type thermocouple, mv->oC
  34. float getThmcVol(); // get voltage of thmc in mV
  35. };
  36. #endif