TMP117 Temperature Sensor
The TMP117 is a high-precision digital temperature sensor. The TMP117 provides a 16-bit temperature result with a resolution of 0.0078°C and an accuracy of up to ±0.1°C across the temperature range of -20°C to 50°C with no calibration.
In Espruino it is supported with the TMP117 (About Modules) module.
Wiring
The module doesn't currently support using the Alert output, so all you need to do is connect GND, VCC (3.3v) and SDA/SCL I2C pins to available data pins.
Connect ADD0
to GND to ensure an address of 0x48
Software
var i = new I2C();
i.setup({sda:YOUR_SDA_PIN, scl:YOUR_SCL_PIN});
var t = require("TMP117").connect(i);
t.getTemp(function(tmp) {
console.log("Temp is "+tmp+" degrees C");
});
Module reference
// starts a one-shot mode and calls callback with the result, usually ~0.2 sec later
TMP117.prototype.getTemp = function (callback) { ... }
/* Connect to TMP117 and return an instance of TMP117.
options = { addr }
*/
exports.connect = function (i2c, options) { ... }
Using
(No tutorials are available yet)
This page is auto-generated from GitHub. If you see any mistakes or have suggestions, please let us know.