- KEYWORDS: Module,I2C,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.js]] module.
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
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");
});
- APPEND_JSDOC: TMP117.js
- APPEND_USES: TMP117