Raspberry Pi driver for MAX31855 Cold-Junction Compensated Thermocouple-to-Digital Converter
Clone or download
Latest commit 71b2724 Apr 18, 2017
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitattributes Initial Commit Sep 22, 2012
.gitignore Initial Commit Sep 22, 2012
README.md Updated readme to clarify pin assignment. Nov 22, 2013
__init__.py Initial Commit Sep 22, 2012
license.txt Added MIT license Oct 6, 2012
max31855.py Added description of the fifth init parameter: board Nov 22, 2013
setup.py add setup.py Mar 12, 2017
test_max31855.py V2.0 Sep 11, 2013


Python driver for MAX31855 Cold-Junction Compensated Thermocouple-to-Digital Converter


Basic use

from max31855 import MAX31855, MAX31855Error

cs_pin = 24
clock_pin = 23
data_pin = 22
units = "f"
thermocouple = MAX31855(cs_pin, clock_pin, data_pin, units)

Note: these are the GPIO pin numbers, not the header pin numbers.
This can be overriden by passing GPIO.BOARD as the fifth init parameter.

See max31855.py for a multi-chip example.



  • SPI now done in software
    • Use whatever pins you want for CS, Clock & Data
    • Hardware SPI was limited to only two chip / slave select lines.
      Now use as many chips a you have extra pins!
  • Removed quick2wire dependency.
  • Removed bitstring dependency; bit extraction and two's complement conversion now done in library.
  • Added cleanup() method to be called on close (or destruction of instance), which does a targeted version of GPIO.cleanup().

NOTE: If you were using the previous hardware-based version, you will have to update your code to match the new init function: MAX31855(cs_pin, clock_pin, data_pin, units)


  • Initial release.