Giter VIP home page Giter VIP logo

max6675's Introduction

MAX6675

Arduino library for interfacing with MAX6675 thermocouple amplifier. Originally from Adafruit but as they abandoned the repository, @SirUli forked and updated the repository from all current pull requests on the repository.

Usage

Initialization

Wiring

There are different namings for each of the connections out there. Therefore copied from Wikipedia:

Name in the library Long Name Other names
SCLK Serial Clock SCK, CLK
CS Slave Select nCS, SS, CSB, CSN, EN, nSS, STE, SYNC, SSQ
MISO Master Input / Slave Output SOMI, SDO (for slave devices ), DO, DOUT, SO, MRSR

Ensure to wire this correctly.

Regular setup

Important due to a specific behaviour in platformio, the SPI library needs to be included in the main file:

#include <SPI.h>

See here for the explanation.

Setup the Sensor like this:

MAX6675 thermocouple;

During the setup method, you need to choose whether you initialize the Hardware SPI outside the MAX sensor or if the library should take care of it all.

Library takes care

Set the pins for SCLK, CS, MISO as arguments. You can additional set the optional offset for the temperature in degrees Celsius. If you want to use Fahrenheit offsets, you need to set that using setOffsetFahrenheit();

thermocouple.begin(SCLK, CS, MISO[, OFFSET]);

Hardware SPI

@eadf added a hardware SPI mode. In this mode the SPI pins can be reused for your MAX6675 device as well as any other SPI gadget you got connected. Assumes you already have setup SPI with SPI.begin(). You can additional set the optional offset for the temperature in degrees Celsius. If you want to use Fahrenheit offsets, you need to set that using setOffsetFahrenheit();

thermocouple.begin(CS[, OFFSET]);

Legacy initialization in constructor

SPI Setup

If the SPI is not used for anything else, then setup the Sensor like this. You can additional set the optional offset for the temperature in degrees Celsius. If you want to use Fahrenheit offsets, you need to set that using setOffsetFahrenheit();

MAX6675 thermocouple(SCLK, CS, MISO[, OFFSET]);

Hardware SPI

@eadf added a hardware SPI mode. In this mode the SPI pins can be reused for your MAX6675 device as well as any other SPI gadget you got connected. Assumes you already have setup SPI with SPI.begin(). You can additional set the optional offset for the temperature in degrees Celsius. If you want to use Fahrenheit offsets, you need to set that using setOffsetFahrenheit(); Use the single value constructor to access this mode:

MAX6675 thermocouple(CS[, OFFSET]);

Methods

Retrieves the temperature in degrees Celsius

double readCelsius();

Retrieves the temperature in degrees Fahrenheit

double readFahrenheit();

Configures an offset in degrees Celsius for the sensor

void setOffsetCelsius();

Configures an offset in degrees Fahrenheit for the sensor

void setOffsetFahrenheit();

Continuous Integration

Build Status

Release History

  • 1.0 Original Release by Adafruit
  • 2.0 Move to SirUli's repository with fixes and change of constructor

max6675's People

Contributors

amicol avatar bauer-san avatar eadf avatar ivankravets avatar lacklustrlabs avatar ladyada avatar madacol avatar paintyourdragon avatar siruli avatar tdicola avatar valeros avatar

Watchers

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