Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

node-bmp180

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-bmp180

A module to interface with BMP180/BMP085 temperature and pressure sensor from Node.js.

latest
Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
8
300%
Maintainers
1
Weekly downloads
 
Created
Source

Node-BMP180

Read temperature and pressure from BMP180 or BMP085 sensors using Node.js.

NPM

Install

$ npm install node-bmp180
$ yarn add node-bmp180

Usage

With no units specified this library returns temperature in Celsius and pressure in Pascal.

const BMP180 = require('node-bmp180');

const sensor = new BMP180.BMP180({
	address: 0x77,
	mode: BMP180.Mode.UltraHighResolution
});

(async () => {
	const { pressure, temp } = await sensor.read();

	console.log(`Pressure: ${pressure} Pa`);
	console.log(`Temperature: ${temp} C`);
})();
const BMP180 = require('node-bmp180');

const sensor = new BMP180.BMP180({
	address: 0x77,
	mode: BMP180.Mode.UltraHighResolution,
	units: {
		temperature: BMP180.TemperatureUnit.Fahrenheit,
		pressure: BMP180.PressureUnit.InchesOfMercury
	}
});

(async () => {
	const { pressure, temp } = await sensor.read();

	console.log(`Pressure: ${pressure} inHg`);
	console.log(`Temperature: ${temp} F`);
})();

Legacy package

Keywords

bmp085

FAQs

Package last updated on 02 Dec 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts