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.




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

  1. Hallo,

    kannst du bitte eine Anleitung machen wie man die Bibliothek jetzt benutzt. Danke!

  2. 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 :).



  3. Заключение просклонять. При рождении ребенок подобен чистому листу и все свои черты.
    Мышление в педагогике. Общество и человек. Первобытный человек
    обнаруженный в индии. До скольки лет формируется психика человека.
    Тест человек индивид личность с ответами 8 класс.
    Картинки месяца.

  4. Индивидуальность значение слова.

    В отличие от людей. Ложная память 6 букв. Не хочу работать картинки.
    Личность как субъект общественных отношений.
    Почему понятие свобода одно из важнейших для эпохи просвещения история.
    Что такое ментальное здоровье человека.
    Вид мышления опирающийся на непосредственное восприятие
    предметов называется.

  5. What i don’t realize is in reality how you’re not really much more smartly-favored than you might
    be now. You’re so intelligent. You realize thus considerably when it comes to this matter, produced me in my opinion imagine it from a lot
    of various angles. Its like women and men aren’t fascinated except
    it’s something to do with Lady gaga! Your personal stuffs great.
    All the time care for it up!

  6. Hello! Do you know if they make any plugins to safeguard against hackers?

    I’m kinda paranoid about losing everything I’ve
    worked hard on. Any suggestions?

Leave a Reply

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