Skip to content

MAX31856 Adafruit breakout board: Python library for Raspberry Pi

License

Notifications You must be signed in to change notification settings

apeitup/Adafruit_Python_MAX31856

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Adafruit_Python_MAX31856

Python library for accessing the MAX31856 thermocouple temperature sensor on a Raspberry Pi.

Designed specifically to work with the Adafruit MAX31856 sensor.

Installing dependencies

Run the following:

$ sudo apt-get update
$ sudo apt-get install build-essential python-dev python-smbus

Make Sure SPI is Enabled on Your Pi

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

Installing Library

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 ./.

Running Example/ Tests

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

Debugging

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.

Supporting Developer

Please consider supporting me if you found this code helpful: http://paypal.me/johnrbnsn

Acknowledgement

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.

About

MAX31856 Adafruit breakout board: Python library for Raspberry Pi

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%