The BMP180 device is a digital barometric pressure sensor. This is available on a small module which provides access to the sensor via the I2C interface. This allows us to easily connect it to the Raspberry Pi with a minimum of wiring.
My module is a small pcb measuring 15x13mm with a 5 pin header. The order of the pins may vary on other modules so keep an eye on the labels so you connect up the correct wires from the Pi.
The BMP180 is made by Bosch and the official BMP180 datasheet includes all the technical details.
Configure I2C Interface
In order to use this module you must enable the I2C interface on the Raspberry Pi as it is not enabled by default. This is a fairly easy process and is described in my Enabling The I2C Interface On The Raspberry Pi tutorial.
The table below shows how the module is connected to the Raspberry Pi’s GPIO header (P1). Please refer to my GPIO header guide for a diagram.
|Module PCB||Desc||GPIO Header Pins|
Here is a diagram of a breadboard setup. If you are connecting the module’s four pins directly to the Pi you only need four female-female wires.
The breadboard diagram uses a custom part I defined in Fritzing. Other modules are available which have different pin arrangements so make sure you are connecting the correct pins to the Pi if yours is different to the one shown in this tutorial.
With the device connected and the Pi powered up the “i2cdetect” command should show the device with address 0x77.
Example Python Script
My example script to read pressure and temperature data from the sensor can be downloaded directly to your Pi using the following command :
or use this link in a browser.
In order to run it you can use the following command :
sudo python bmp180.py
The output looks something like this :
The module is available from Amazon and many other online electronics shops. You can also find .