mysensors/libraries/MySensorsArduinoExamples/libraries/MAX6675
Simon 8cdca78b4f Version 1. Gateway + tempHum 2017-04-01 20:58:16 +02:00
..
examples/read_temp Version 1. Gateway + tempHum 2017-04-01 20:58:16 +02:00
MAX6675.cpp Version 1. Gateway + tempHum 2017-04-01 20:58:16 +02:00
MAX6675.h Version 1. Gateway + tempHum 2017-04-01 20:58:16 +02:00
README.markdown Version 1. Gateway + tempHum 2017-04-01 20:58:16 +02:00
keywords.txt Version 1. Gateway + tempHum 2017-04-01 20:58:16 +02:00

README.markdown

MAX6675 Arduino Library

Version: 2.0.1

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

Summary

The primary use of the library is to easily interface with a MAX6675 chip via it's SPI interface. Use the following code to initialize the library. V2 also greatly improves performance and timing of the chip for more accurate reads. Thanks Ed!

MAX6675 temp0(CS,SO,SCK,units);

Variables:

  • CS is chip select pin of chip
  • SO is data out of the chip
  • SCK is the clock pin of the chip
  • units is one of the following:
    • 0 = raw 0-4095 value
    • 1 = temp in ˚C
    • 2 = temp in ˚F

Following this you can use the read_temp() function to return the temperature as a float.

temperature = temp0.read_temp();