BME280 Temperature Sensor

BME280 Temperature Sensor

Hands-On Lab: BME280 Temperature Sensor

Objective: Read temperature from BME280 sensor via I2C.

The lab reads one sensor over two wires, but the board offers more than two. Figure 1 shows which edge belongs to this lab.

A small BME280 breakout board with a square metal-capped sensor package and a row of pin headers
Figure 1: A BME280 breakout board like the one this lab targets. The exposed metal-capped sensor is what the scanner below detects at 0x76 or 0x77, and the same board handles the temperature, humidity, and pressure reads this lab walks through. Photo: SparkFun Electronics, CC BY 2.0

The small metal-capped part near the centre of Figure 1 is the sensor itself; everything else on the red board exists to reach it. Look at the two edges. One carries just four pads: ground, 3.3 volts, and the SDA and SCL pair this lab uses. The opposite edge carries six, adding a separate clock, data in, data out and chip select, because the same part also speaks the four-wire bus covered elsewhere in this module. Choosing an edge is therefore choosing a protocol. Note too that the holes are bare. The board ships without headers, so soldering is a step the parts list has to include before any scan can succeed.

Back to the chapter