skylarstein / bme280-sensor

A Node.js I2C module for the Bosch BME280 Humidity, Barometric Pressure, and Temperature Sensor
MIT License
36 stars 22 forks source link

Update #12

Open fmuntean opened 4 years ago

fmuntean commented 4 years ago

Please add configuration register setting during read: this.REGister_CONFIG = 0xF5 this.i2cBus.writeByte(this.i2cAddress, this.REGISTER_CONFIG, 0xE0, (err) => { return err ? reject(err) : resolve(chipId); });

This will set inactive duration to 1000 and the IIR filter to 16 thus giving better readings. Also the board should be put to sleep after reading. If not the chip could heat itself giving wrong temperature readings. this.i2cBus.writeByte(this.i2cAddress, this.REGISTER_CONTROL, 0x00); // Set to sleep mode again to prevent the sensor from heating up.

skylarstein commented 4 years ago

Hi @fmuntean - thank you for the suggestions. Let me take a look..