Posts

Showing posts from April, 2021

I2C Sensors Part Deux

Image
 I found my BME680 sensor module in the clutter on my workbench this week, so let's extend the previous project to include the additional features of the BME680.  First we will need to wire it to the Pi.  Since it has the same electrical interface, we can just pull the patch wires off the BMP280 and move them to the BME680.   Once again, we have from the BME to the Pi: Vcc to 3V3 (1), SDA to SDA (3), SCL to SCL(5), and GND to GND (6). If you recall from the previous tutorial, there was some question of what the I2C bus address for the module would be, so once we get the hardware installed, we will probe the bus for addresses to make sure we know which one we got.  In the case of my sensor pictured above: $ sudo i2cdetect -y 1      0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f 00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- --...

I2C Sensors are fun and easy

Image
 I've responded to quite a few Facebook posts over the past few years where users were struggling with getting data from a DHT-11 temperature sensor.  They, or often another commenter on the thread, often seem offended or even angry when I suggest smashing the DHT-11 with a hammer and using a Bosch BMP-280 instead.  So I've decided to do write a quick tutorial to cover why. For the TL;DR impatient: no there isn't a video. Two questions that come up often in the comments are: Aren't they more complicated than the DHT?  Yes, the sensors are more complicated, which is why the interface  to the sensors is less complicated. Aren't they more expensive than the DHT?  Yes, a little bit.  Checking Amazon, I found BMP-280 modules for as little as $2 each, including jumper wires to connect them to your Pi.  That's a little more than a cheap DHT-11, or about the same price as a DHT-11 on a module with the interface electronics and some pins. Bosch Sensortec m...