Giter Site home page Giter Site logo

bme280's People

Contributors

gregoryng avatar jlac11 avatar kbrownlees avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

bme280's Issues

PIP install

Dear Sir

Tried to follow your installation description pip install bme280 and it didnt work, it didnt find the read_bme280 file, than I have found out that it did install it in some place pi/.local.

the fix for it was to use sudo pip install or run the pip install as root.

I recommend that you add this info for installation process to run as root or use sudo.

bme280.setup should avoid exposing bme280_i2c

Looking at the read_bme280 script, the minimal script to read a sensor data from Python is:

from bme280 import bme280, bme280_i2c

bme280_i2c.set_default_i2c_address(0x76)
bme280_i2c.set_default_bus(1) 
bme280.setup()
data = bme280.read_all()

Instead I would expect the following minimal script, which would make it honor Python unspoken standards (cf. import statistics):

import bme280

bme280.setup() # or bme280.setup(0x76, 1)
data = bme280.read_all()

This avoids exposing the i2c class, so that once a SPI class becomes available as a backend, it'll be easier to switch.

Attribute Error

Hi
I use bme280 0.3 package. As "i2cdetect -y 1" command returns, my BME280 has address 0x77 and "read_bme280 -- help" command works well. But when I test "read_bme280 --i2c-address 0x77" command, following error appears:
Traceback (most recent call last):
File "/usr/local/bin/read_bme280", line 9, in
load_entry_point('bme280==0.3', 'console_scripts', 'read_bme280')()
File "/usr/local/lib/python3.4/dist-package/bme280/bme280.py", line 210, in main
bme280_i2c.set_default_bus(int(args.i2c_bus))
File "/usr/local/lib/python3.4/dist-package/bme280/bme280.py", line 22, in set_default_bus
default_bus = smbus.SMBus(bus_number)
AttributeError: 'NoneType' object has no attribute 'SMBus'

Can anybody help me?

munin plugin run: read_bme280 not found

On Raspbian (Jessie), the read_bme binary is not known by the plugin:

$ sudo munin-run bme280_temperature
/etc/munin/plugins/bme280_humidity: 21: /etc/munin/plugins/bme280_humidity: read_bme280: not found

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.