Temperature and Pressure Sensors (2)

python-dadfruitbmp180Figure 1: The Raspbian desktop, showing pressure, temperature, altitude. Click to enlarge.

Posted 05/11/2016:

I “installed” the BMP180 board into the little tablet enclosure, using only one screw without a nut.  Yes – I fully intend to put the other one into the board.  The Pi2 board needs one as well (and they’ll both need nuts!)  There is some floor area inside of the enclosure that is normally not good for anything, because of the posts that connect the top and bottom halves of the box.  Only something as small as the BMP180 fits into the space.

So, I connected the BMP device to the expansion header of the Cirrus adapter, using conductive gel to “glue” the female header pins onto both sides of the connection.  How did it work?

Well!  In fact, the internet lore about I2C devices conflicting with the audio card are not yet warranted, IMO.  I have temp, pressure, and altitude readings, and audio as well, with no reboots necessary!

python-dadfruitbmp180Figure 2: The Raspbian desktop, showing pressure, temperature, altitude. (Click to enlarge)

In figure 3, one can see the Raspbian desktop with a couple open terminals, and the pressure, temperature, and altitude readings.  In the second terminal can be seen the result of a i2cdetect query (this needs sudo apt-get install i2c-tools).   In the graphic, the “77” is the BMP180.  So, this detection test is the first thing to run after wiring the BMP180 into a project.   I loaded the i2c driver with:

  • sudo modprobe i2c-dev
  • lsmod should show the module is loaded

To use python to retreive data from the BMP180, I used the Adafruit python library.  It is described here:


As can be seen in the article on those pages,  it is necessary to install other packages:

  • sudo apt-get install python-dev python-smbus

So, things are moving along.  I need SPI to work, in order to control the 8 channel ADC converters needed to read voltages, for the battery and other things as well.  Again, I read on the internet where this is problematic.  Hopefully, it’ll be bunk as well as the I2C lore.  Here’s hoping. If I cannot get the SPI bus to cooperate, I DO have another plan.  Stay tuned …

OK, lets show the Cirrus expansion header connection that I used to wire the BMP into the system:

expansionhdr-cirrusAFigure 3: The Cirrus adapter is piggybacked onto the Pi2, and it’s the adapter’s expansion header that we use for the BMP180 connections. 

Read More …

Note: This author and site is not affiliated with the Raspberry Pi in any way. For informationabout those projects visit  http://www.raspberrypi.org. “Raspberry Pi” is a trademark of the Raspberry Pi Foundation. The BMP180 is a product of Adafruit Industries, and can be viewed at https://www.adafruit.com.  This site and author are not affiliated with Adafruit in any way.

Cirrus Logic makes the audio board shown, and is not affiliated with this site or author in any way.  Figures 1,2 contains elements of a desktop system and associated programs that have been released under a free software license (Copyright: LXDE team: http://lxde.org). As a derivative work of that program, the respective part of the screenshot in figures 1,3 fall under that same license. The full text of the licences (GPL 2.0+ and LGPL 2.1+) may be found at http://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html and http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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