Awesome Open Source
Awesome Open Source


A node.js module for reading Adafruit's Bosch BMP085 barometer sensor using i2c.


$ npm install bmp085

Raspberry Pi users: Remember to enable i2c on your Pi if you haven't done already.

Also remember to use sudo when running your program if you haven't exported your GPIO pins to user space.


The module's read function takes a callback function as an argument. The callback will receive an object with the temperature (in degrees Celcius) and air pressure (in hPa).


var BMP085 = require('bmp085'),
    barometer = new BMP085(); (data) {
    if (data !== null) {
        console.log("Temperature:", data.temperature);
        console.log("Pressure:", data.pressure);


Optionnaly configure the sensor by supplying an options object to the constructor:

new BMP085(
        'mode': 1,
        'address': 0x77,
        'device': '/dev/i2c-1'


Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
javascript (70,927
npm-package (264
sensor (74
i2c (47