Code Monkey home page Code Monkey logo

node-max31855pi's Introduction

node-max31855pi

Raspberry Pi driver for the MAX31855 thermocouple amplifier

NPM

Uses the bcm2835 C library to talk to the GPIO. If you don't use Node, you're welcome to steal the code in max31855.cc which is not Node-specific.

Usage

var max31855pi = require('max31855pi')
var listener = max31855pi()

listener.on('temperature', function (temp) {
  console.log('Current temp =', temp, 'C')
})

listener.start()

There is also a listener.stop() to stop the listener.

By default, the CS pin is bound to GPIO P1-15 (22) pin, the SO pin is bound to GPIO P1-21 (9) pin and the SCK pin is bound to the GPIO P1-23 (11) pin. You can change this by supplying an options object and overriding the one you want: max31855pi({ cs: 22, so: 9, sck: 11 }).

The default temperature-check frequency is 500ms, supply a new frequency value to listener.start() if this isn't suitable.

License

node-max31855pi is Copyright (c) 2013 Rod Vagg @rvagg and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.

node-max31855pi's People

Contributors

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