Advertisement
marcushund

thermometers.h

Jun 25th, 2014
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.65 KB | None | 0 0
  1. #ifndef THERMOMETERS_H
  2. #define THERMOMETERS_H
  3. #include "spark_wiring_string.h"
  4. #include "spark_wiring_usartserial.h"
  5. #include <math.h>
  6. #define NUM_THERMOMETERS 4
  7. extern char* itoa(int a, char* buffer, unsigned char radix);
  8. class thermometers {
  9. public:
  10.     thermometers();
  11.     float get(int index);
  12.     void get(int index, String* out);
  13.     void read_temps();
  14.     void print_temps();
  15.     float ntc(int RawADC);
  16.     void select(byte jj);
  17. private:
  18.     float pad;
  19.     byte temp_map[7];
  20.     float temperatures[NUM_THERMOMETERS];//board,in,out,water,acku,skorsten
  21.     char * ftoa(char *a, double f, int precision);
  22. };
  23. #endif  /* THERMOMETERS_H */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement