Coder Social home page Coder Social logo

max31855's Introduction

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

Requires:

Basic use

#!/usr/bin/python
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)
print(thermocouple.get())
thermocouple.cleanup()

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.

Changelog

V2.0

  • 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)

V1.0

  • Initial release.

max31855's People

Contributors

tuckie avatar dlleigh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.