Datasheet
You can also download the adafruit_max31855.mpy from its releases page on Github.
Before continuing make sure your board's lib folder or root filesystem has
the adafruit_max31855.mpy, and adafruit_bus_device files and folders copied over.
Next connect to the board's serial REPL so you are at the CircuitPython >>> prompt.
Usage
To demonstrate the usage of the sensor we'll initialize it and read the temperature. First initialize the SPI connection
and library by running:
Now you can read the temperature property to retrieve the temperature from the sensor in degrees Celsius:
That's all there is to reading temperature with the MAX31855 and CircuitPython code!
import board
import busio
import digitalio
import adafruit_max31855
spi = busio.SPI(board.SCK, MOSI=board.MOSI, MISO=board.MISO)
cs = digitalio.DigitalInOut(board.D5)
max31855 = adafruit_max31855.MAX31855(spi, cs)
print('Temperature: {} degrees C'.format(max31855.temperature))
© Adafruit Industries https://learn.adafruit.com/thermocouple Page 11 of 18