Python library for accessing the MAX31856 thermocouple temperature sensor on a Raspberry Pi.
Designed specifically to work with the Adafruit MAX31856 sensor.
Run the following:
$ sudo apt-get update $ sudo apt-get install build-essential python-dev python-smbus
To enable SPI, edit the /boot/config.txt file, uncommenting the line about SPI, and setting it to: dtparam=spi=on
You can confirm that SPI is enabled by checking to see you get a response similar to the one below.
$ lsmod | grep spi spi_bcm2835 7074 0
I recommend running this code from within a virtual environment, cd to your desired source directory and clone the repository:
$ git clone https://github.com/johnrbnsn/Adafruit_Python_MAX31856.git $ cd Adafruit_Python_MAX31856 $ python3 -m venv env_py3 $ source env_py3/bin/activate (env_py3) $ pip install -r requirements.txt (env_py3) $ pip install ./.
Examples are in the examples directory, or tests are in the Adafruit_MAX31856 directory. From within this directory, run simpletest.py:
(env_py3) $ python simpletest.py
Runing Tests, cd to Adafruit_MAX31856 and run:
(env_py3) $ python test_MAX31856.py -v
If you are having issues, run the tests located in the Adafruit_MAX31856 directory by:
python test_MAX31856.py -v
The resulting output and the test_MAX31856.log file should help with debugging the issue.
Please consider supporting me if you found this code helpful: http://paypal.me/johnrbnsn
This code was modeled after the Adafruit MAX31855 repository which works with the prior version of this thermocouple amplifier. There is only an Arduino example available from Adafruit at this time, since I use RasPi, I created this library.