Download the file
  1. #ifndef TEMPERATURE_H
  2. #define TEMPERATURE_H
  3.  
  4. #include <OneWire.h>
  5.  
  6. class Temperature {
  7. public:
  8. Temperature();
  9. void start_reading();
  10. unsigned short get_value();
  11.  
  12. private:
  13. OneWire ds; // Arduino pin 6 is JeeNode Port3 D
  14. bool initialized;
  15. uint32_t ready_time;
  16. uint8_t addr[8];
  17. uint8_t data[12];
  18. };
  19.  
  20. #endif
  21.  
  22. // vim:ft=arduino
  23.