Skip to content

An Node.js module to interface a BMP085 temperature and pressure sensor with the Raspberry Pi

License

Notifications You must be signed in to change notification settings

baslking/bmp180

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BMP180.js

Access a BMP180 temperature & barometric pressure sensor from your Raspberry Pi using Node.js. This was forked from dbridges bmp085. The i2c library is no longer maintained and is frequently replaced by the i2c-bus library that is actively maintained. Additionally, the Bosch bmp085 sensor is no longer available and had been replaced by the bmp180, which uses the same set of instructions.

Install

$ npm install bmp180-sensor

Usage

With no units specified, returns inHg and degree F.

var bmp180 = require('bmp180-sensor');

var sensor = bmp180({address: 0x77,
                     mode: 3});

sensor.read(function (err, data) {
  // data is { pressure: 29.957463223223005, temp: 68.9 }
});

You can also specify metric units, returning Pa and degree C:

var bmp180 = require('bmp180-sensor');

var sensor = bmp180({address: 0x77,
                     mode: 3,
                     units: 'metric'});

sensor.read(function (err, data) {
  // data is { pressure: 101435.97, temp: 20.5 }
});

About

An Node.js module to interface a BMP085 temperature and pressure sensor with the Raspberry Pi

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%