bme680-sensor
v1.1.0
Published
Node.js module for controlling Bosch Sensortec [BME680](https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bme680-ds001.pdf) and [BME688](https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bme688-ds000
Downloads
79
Readme
bme680
Node.js module for controlling Bosch Sensortec BME680 and BME688 sensors.
Installation
npm install bme680-sensor
Wiring
| bme680 pin | Raspberry Pi pin| Raspberry Pi GPIO| |-------------|:----------------|:-----------------| | VIN (3,3 V) | 1 | | | GND | 6 | | | SDI | 3 | 2 | | SCK | 5 | 3 |
BME688 support
The changes in the Pimoroni Python library regarding the BME688 variant have been backported to this library. The variant is automatically detected by retrieving it from the I2C address and a different gas measurement calculation is used.
Available Methods
initialize
Initialize the sensor.
| Setting | Default value| |------------------------|:-------------| | Temperature offset | 0 °C | | Gas heater temperature | 320 °C | | Gas heater duration | 150 ms | | Gas heater profile | 0 |
Usage:
'use strict';
const { Bme680 } = require('bme680-sensor');
const bme680 = new Bme680(1, 0x76);
bme680.initialize().then(async () => {
console.info('Sensor initialized');
setInterval(async () => {
console.info(await bme680.getSensorData());
}, 3000);
});
Credits
- BoschSensortec/BME680_driver to understand the i2C communication between the sensor and the controller - Bosch Sensortec GmbH license
- pimoroni/bme680 to understand the i2C communication between the sensor and the controller - MIT
- kelly/node-i2c to communicate with i2c devices - BSD-3-Clause-Attribution