Skip to content

Node library for the Bosch Sensortec BME-280 Barometric Pressure Sensor.

License

Notifications You must be signed in to change notification settings

haryu703/node-BME280

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bme-280

cool

Installation

$ npm install --save node-bme280

Usage

var BME280 = require('node-bme280');

var barometer = new BME280({address: 0x76});

barometer.begin(function(err) {
	if (err) {
		console.info('error initializing barometer', err);
		return;
	}

	console.info('barometer running');

	setInterval(function() {
		barometer.readPressureAndTemparature(function(err, pressure, temperature, humidity) {
			console.info(
				'temp:',
				temperature.toFixed(2),
				'℃  pressure:',
				(pressure / 100).toFixed(2),
				'hPa  hum:',
				humidity.toFixed(2),
				'%'
			);
		});
	}, 1000);
});

License

MIT © OONO Yoshitaka original author: © Grady Morgan

About

Node library for the Bosch Sensortec BME-280 Barometric Pressure Sensor.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%