node package manager

thermocouple-max31855

thermocouple-max31855

Reads data from the thermocouple amplifier MAX31855.

var tessel = require('tessel');
var thermocouplelib = require('thermocouple-max31855');
 
var sensor = thermocouplelib.use(tessel.port['GPIO'], {
    cs: 0,
    poll: 10
});
 
sensor.on('measurement', function (data) {
    console.log(data);
})

Usage

To install the library:

npm install thermocouple-max31855

To include it in your code:

var thermocouplelib = require('thermocouple-max31855');
var sensor = thermocouplelib.use(port, { /* options */ });

# sensor.read( function (err, data) )
Create a measurement reading from the thermocouple. Returns data of this structure:

{
 fault : 0,
 fahrenheit : 86.9,
 shortVCC : 0,
 celsius : 30.5,
 internal : 22.0625,
 openCircuit : 0,
 shortGND : 0
}

# sensor.on( 'measurement' )
Every time a reading is made (using the .read() function or through the .poll option) this event is emitted. See .read() for its data structure.

License

MIT