https://github.com/atus/pimatic-bme280
A pimatic plugin for the BME280 sensor
https://github.com/atus/pimatic-bme280
bme280 iot pimatic pimatic-plugin
Last synced: about 2 months ago
JSON representation
A pimatic plugin for the BME280 sensor
- Host: GitHub
- URL: https://github.com/atus/pimatic-bme280
- Owner: atus
- License: gpl-3.0
- Created: 2017-04-23T17:57:57.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2019-01-18T20:28:03.000Z (over 7 years ago)
- Last Synced: 2025-10-30T00:37:01.237Z (8 months ago)
- Topics: bme280, iot, pimatic, pimatic-plugin
- Language: CoffeeScript
- Size: 22.5 KB
- Stars: 0
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pimatic-bme280
[](http://badge.fury.io/js/pimatic-bme280)
[](https://david-dm.org/atus/pimatic-bme280)
[![downloads][downloads-image]][downloads-url]
[downloads-image]: https://img.shields.io/npm/dm/pimatic-bme280.svg?style=flat
[downloads-url]: https://npmjs.org/package/pimatic-bme280
A pimatic plugin for modules based on the [BME280](https://www.bosch-sensortec.com/bst/products/all_products/bme280) sensor. It uses the `node-bme280` driver from [CLCL/node-BME280](https://github.com/CLCL/node-BME280).
## Configuring device
Add a device via the web UI or by editing the config file.
```
{
"class": "BME280Sensor"
"id": "bme280-test",
"name": "BME280 test",
"device": "i2c-1",
"address": "0x76",
"interval": 10000,
"xLink": "",
}
```
Check using `dir /dev/i2c*` to see the name of your device. USe `i2cdetect` to determine the address. If you can't find this command use `sudo apt-get install -y i2c-tools`.
```
pi@raspberrypi:~/$ i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- 76 --
```
## Raspberry Pi setup
Copied steps from here: https://learn.sparkfun.com/tutorials/raspberry-pi-spi-and-i2c-tutorial#i2c-on-pi
I2C is not turned on by default. We can use `raspi-config` to enable it.
1. Run `sudo raspi-config`.
2. Use the down arrow to select `9 Advanced Options`
3. Arrow down to `A7 I2C`.
4. Select `yes` when it asks you to enable I2C
5. Also select `yes` when it tasks about automatically loading the kernel module.
6. Use the right arrow to select the `` button.
7. Select `yes` when it asks to reboot.
The system will reboot. when it comes back up, log in and enter `ls /dev/*i2c*`.
The Pi should respond with `/dev/i2c-1` which represents the user-mode I2C interface.