Soldering

Raspberry Pi + sensors (photo by Simona Manganoni)

The first challenge was to solder the two modules to the raspberry together. Being the first time to use a Raspberry, I wasn’t sure how the pins worked. On the modules’ technical sheet, it said they both used the I2C interface. That was a start. Using pinout.xyz, I found out that the Enviro pHAT didn’t use all the pins so I soldered only the ones needed for it, having in mind I might add other modules in the future. Then I saw what pins the BME680 used and unfortunately some of the pins were used by the other module as well.

I had to research what the I2C interface was. It turns out it’s a way to connect multiple devices together on the same port, a unique address is assigned to each device (by the device itself). This means that there may be two devices that use the same I2C interface.

With the command sudo i2cdetect -y 1 I was able to see what addresses were being used by the modules after I soldered them on the Raspberry.

So now I have the Raspberry working, and I have the modules soldered in.

Note: The I2C interface must be enabled using raspi-config

To test the modules I downloaded the modules’ libraries which included an example script. Here’s the Enviro pHAT’s library and here the BME680’s library, both written in Python.

Both python2 and python3 were already installed in the latest Raspbian (Linux distribution for the Raspberry). I decided to use python3 since the libraries were in python.