Skip to content

Latest commit

 

History

History
55 lines (39 loc) · 1.46 KB

MCP9808.md

File metadata and controls

55 lines (39 loc) · 1.46 KB

MCP9808 precision I2C temperature sensor

  • KEYWORDS: Module,I2C,MCP9808,temperature,sensor

This is a module that makes it easy to connect to a MCP9808 Precision [[I2C]] Temperature sensor.

The MCP9808 is a precision [[I2C]] temperature sensor from Microchip between -20°C and +100°C with +- 0.25°C / +- 0.5°C (typical/maximum) accuracy. This module makes it easy to connect this sensor with an espruino board.

Use the MCP9808 module for it.

Wiring Up

Pin Espruino
GND GND
VCC 3.3v
SDA B7
SCL B6
ALERT Open-Drain-Output
A2 GND or 3.3v
A1 GND or 3.3v
A0 GND or 3.3v

Software

How to use the module:

I2C1.setup({scl:B6,sda:B7, bitrate: 60000});
var mcp = require("MCP9808").connect(I2C1, 0b000); // 0b000 means A2 = A2 = A1 = GND 
var temperature = mcp.getTemperature();
console.log("Temperature: " + temperature + " C");

The sensor can handle bitrates up to 400000 but I had stability problems with this.

Reference

  • APPEND_JSDOC: MCP9808.js

Buying

Links