Raspberry Pi library for sensors DHT11, BMP085, DS18B20, WireGate DR9490R and more!

Working with sensors on the Raspberry Pi is real fun. You can try out stuff, expand the Internet of things, make automations and so on.

The problem for me was that there were so many different scripts out there with different functionalities and outputs. I wanted to make on package with unified in and output and there it is. It would have never been possible with the excellent work of Adafruit Industries (DHT, DS18B20 and BMP085 driver) and of course Matt Hawkins from www.raspberrypi-spy.co.uk (Ultrasonic and PIR driver)

Currently supported sensors: DHT11, DHT22, AM2302 (temperature and humidity), DS18B20 (temperature, with kernel driver or Wiregate), HC-SR04 (Ultrasonic distance sensor), BMP085 (Temperature, pressure, altitude), PIR (Motion detection)

DHT11, DHT22, AM2302, DS18B20, WireGate DR9490R, HC-SR04 (Ultrasonic Sensor),  BMP085 (Temperate, Pressure, Altitude), PIR


You can get the whole package from here: rpi_sensors

Or get it via Github (make sure to put all into one directory)

git clone https://github.com/syss/rpi_sensors
git clone https://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code/tree/master/Adafruit_BMP085

When you want to use this library you need to install the following packages: python-dev python-smbus owfs-fuse

This can be done by the following command

#update lists and upgrade software first
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install -y python-dev python-smbus owfs-fuse

It is very convenient to load all needed modules on startup. You need to disable the blacklisted modules (default on raspbian image) here:


just comment out the blacklist lines with a sharp (#)

# blacklist spi and i2c by default (many users don't need them)

#blacklist spi-bcm2708
#blacklist i2c-bcm2708

then you need to set the modules which should be loaded on startup. You will find them here:


edit it so it looks like this.

# /etc/modules: kernel modules to load at boot time.
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
# Parameters can be specified after the module name.

#Used for BMP085
#Used for 1-Wire DS18B20

If you use the Dallas Wiregate (DR9490R) you can do these easy steps to make it work with this python library. (make sure you have installed the package owfs-fuse). I found the commands from this site

sudo mkdir /media/1-wire
sudo owfs --allow_other -u /media/1-wire

Now you are done and can use the Python library for your projects.

Some examples will follow in the next days.




12 thoughts on “Raspberry Pi library for sensors DHT11, BMP085, DS18B20, WireGate DR9490R and more!”

  1. Hi, das klingt alles echt interessant und nützlich. Danke für die Arbeit und dass Du das mit der Welt teilst.

    Ich glaube jeder der das bei Google ffindet freut sich über ein, zwei Beispiele :).



  2. I have noticed you don’t monetize your website, don’t waste
    your traffic, you can earn extra bucks every month because you’ve got high quality content.
    If you want to know how to make extra bucks, search for: best adsense alternative Wrastain’s tools

  3. I’ve been exploring for a bit for any high-quality articles or
    weblog posts on this sort of area . Exploring in Yahoo I at
    last stumbled upon this web site. Reading
    this information So i am glad to exhibit that
    I’ve an incredibly excellent uncanny feeling I came upon exactly what
    I needed. I most without a doubt will make sure to don?t overlook this website and
    provides it a look on a constant basis.

  4. Hi to every one, the contents present at this web site are genuinely remarkable for people experience,
    well, keep up the good work fellows.

  5. naturally like your website but you need to take a look at the spelling on quite a
    few of your posts. Several of them are rife with spelling problems and I to find
    it very troublesome to tell the reality on the other hand I’ll surely come back again.

  6. 36 Justin Currie Jersey.33 Terron Ward Jersey.
    The sponsors have paid anything from an estimated
    ?8m to ?120m to have their names associated with what is one of the two biggest 36
    JaCorey Shepherd Jersey suppliers.

  7. Ich wirklich beeindruckt von Ihhrer Schreibfähigkeiten unnd mmit dem Layout auf dem weblog.

    Ist das eine bezahlte Thsma oder haben Siee ändern it yourself?
    So oder so Wie aych immer weiter so schön ausgezeichnete Qualität Schreiben, es ist selten, ein schönes große siehe
    Blog wie diese heute.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.