# Adafruit BME680

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/093/608/medium800/temperature___humidity_3660_iso_ORIG_2020_07.jpg?1596135758)

The long awaited BME680 from Bosch gives you _all the environmental sensing you want_ in one small package. This little sensor contains **temperature** , **humidity** , **barometric pressure** and **VOC gas** sensing capabilities. All over SPI or I2C, at a great price!

Like the BME280 & BMP280, this precision sensor from Bosch can measure humidity with ±3% accuracy, barometric pressure with&nbsp;±1 hPa absolute accuracy, and temperature with ±1.0°C accuracy. Because pressure changes with altitude, and the pressure measurements are so good, you can also use it as an altimeter with&nbsp; ±1 meter or better accuracy!

![](https://cdn-learn.adafruit.com/assets/assets/000/093/611/medium800/temperature___humidity_3660_kit_ORIG_2020_07.jpg?1596135880)

The BME680 takes those sensors to the next step in that it contains a small MOX sensor. The heated metal oxide changes resistance based on the volatile organic compounds (VOC) in the air, so it can be used to detect gasses & alcohols such as Ethanol, Alcohol and Carbon Monoxide and perform air quality measurements. Note it will give you one resistance value, with overall VOC content, it cannot differentiate gasses or alcohols.

![](https://cdn-learn.adafruit.com/assets/assets/000/093/610/medium800/temperature___humidity_3660_detail_ORIG_2020_07.jpg?1596135829)

To make things easier and a bit more flexible, we've also included&nbsp;[SparkFun Qwiic](https://www.sparkfun.com/qwiic)&nbsp;compatible&nbsp;[STEMMA QT](https://learn.adafruit.com/introducing-adafruit-stemma-qt)&nbsp;connectors for the I2C bus so you don't even need to solder! Just plug in a compatible cable and attach it to your MCU of choice, and you’re ready to load up some software and measure some light.

![](https://cdn-learn.adafruit.com/assets/assets/000/093/609/medium800/temperature___humidity_3660_quarter_ORIG_2020_07.jpg?1596135809)

 **Please note, this sensor, like _all_ VOC/gas sensors, has variability and to get precise measurements you will want to calibrate it against known sources!** That said, for general environmental sensors, it will give you a good idea of trends and comparisons. We recommend that you run this sensor for 48 hours when you first receive it to "burn it in", and then 30 minutes in the desired mode every time the sensor is in use. This is because the sensitivity levels of the sensor will change during early use and the resistance will slowly rise over time as the MOX warms up to its baseline reading.

Info: 

![](https://cdn-learn.adafruit.com/assets/assets/000/048/063/medium800/adafruit_products_3660_kit_ORIG.jpg?1510167383)

For your convenience we've pick-and-placed the sensor on a PCB with a 3.3V regulator and some level shifting so it can be easily used with your favorite 3.3V or 5V microcontroller.

# Adafruit BME680

## Pinouts

![](https://cdn-learn.adafruit.com/assets/assets/000/093/612/medium800/temperature___humidity_BME680_top_pinouts.jpg?1596135997)

![](https://cdn-learn.adafruit.com/assets/assets/000/048/064/medium800/adafruit_products_pinouts.jpg?1510167436)

## Power Pins:

- **Vin** - this is the power pin. Since the sensor chip uses 3 VDC, we have included a voltage regulator on board that will take 3-5VDC and safely convert it down. To power the board, give it the same power as the logic level of your microcontroller - e.g. for a 5V micro like Arduino, use 5V
- **3Vo** - this is the 3.3V output from the voltage regulator, you can grab up to 100mA from this if you like
- **GND** - common ground for power and logic

# SPI Logic pins:

All pins going into the breakout have level shifting circuitry to make them 3-5V logic level safe. Use whatever logic level is on **Vin!**

- **SCK** - This is the **S** PI **C** loc **k** pin, its an input to the chip
- **SDO** - this is the **S** erial **D** ata **O** ut / **M** icrocontroller **I** n **S** ensor **O** ut&nbsp;pin, for data sent from the BME680 to your processor
- **SDI** - this is the **S** erial **D** ata **I** n / **M** icrocontroller **O** ut **S** ensor **I** n&nbsp;pin, for data sent from your processor to the BME680
- **CS** - this is the **C** hip **S** elect pin, drop it low to start an SPI transaction. Its an input to the chip

If you want to connect multiple BME680's to one microcontroller, have them share the SDI, SDO and SCK pins. Then assign each one a unique CS pin.

## I2C Logic pins:

- **SCK** - this is _also_ the I2C clock pin, connect to your microcontrollers I2C clock line.
- **SDI** - this is _also_ the I2C data pin, connect to your microcontrollers I2C data line.
- [**STEMMA QT**](https://learn.adafruit.com/introducing-adafruit-stemma-qt) **&nbsp;-** These connectors allow you to connectors to dev boards with&nbsp; **STEMMA QT** connectors or to other things with&nbsp;[various associated accessories](https://www.adafruit.com/?q=JST%20SH%204)

Leave the other pins disconnected

# Adafruit BME680

## Assembly

Info: 

![](https://cdn-learn.adafruit.com/assets/assets/000/026/681/medium800/sensors_2652_kit_ORIG.jpg?1437769737)

## Prepare the header strip:

Cut the strip to length if necessary. It will be easier to solder if you insert it into a breadboard - **long pins down**

![sensors_header.jpg](https://cdn-learn.adafruit.com/assets/assets/000/026/682/medium640/sensors_header.jpg?1437769803)

## Add the breakout board:

Place the breakout board over the pins so that the short pins poke through the breakout pads

![sensors_place.jpg](https://cdn-learn.adafruit.com/assets/assets/000/026/683/medium640/sensors_place.jpg?1437769815)

## And Solder!

Be sure to solder all pins for reliable electrical contact.  
  
_(For tips on soldering, be sure to check out our_ [_Guide to Excellent Soldering_](http://learn.adafruit.com/adafruit-guide-excellent-soldering)_)._

![sensors_solder1.jpg](https://cdn-learn.adafruit.com/assets/assets/000/026/684/medium640/sensors_solder1.jpg?1437769829)

![sensors_solder2.jpg](https://cdn-learn.adafruit.com/assets/assets/000/026/685/medium640/sensors_solder2.jpg?1437769864)

You're done! Check your solder joints visually and continue onto the next steps

![sensors_done.jpg](https://cdn-learn.adafruit.com/assets/assets/000/026/686/medium640/sensors_done.jpg?1437769961)

# Adafruit BME680

## Arduino Wiring & Test

You can easily wire this breakout to any microcontroller, we'll be using an Arduino compatible. For another kind of microcontroller, as long as you have 4 available pins it is possible to 'bit-bang SPI' or you can use two I2C pins, but usually those pins are fixed in hardware. Just check out the library, then port the code.

# I2C Wiring

Use this wiring if you want to connect via I2C interface

By default, the i2c address is 0x77. &nbsp;If you add a jumper from SDO to GND, the address will change to 0x76.

&nbsp;

- Connect **Vin (red wire on STEMMA QT version)** to the power supply, 3-5V is fine. Use the same voltage that the microcontroller logic is based off of. For most Arduinos, that is 5V. For 3.3V logic devices, use 3.3V
- Connect **GND (black wire on STEMMA QT version)** to common power/data ground
- Connect the **SCK** breakout pin to the I2C clock **SCL** pin on your Arduino compatible **(yellow wire on STEMMA QT version)**  
- Connect the **SDI** breakout pin to the I2C data **SDA** pin on your Arduino compatible **(blue wire on STEMMA QT version)**

&nbsp;

![temperature___humidity_BME680_Arduino_I2C_STEMMA_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/093/613/medium640/temperature___humidity_BME680_Arduino_I2C_STEMMA_bb.jpg?1596136845)

![temperature___humidity_BME680_Arduino_I2C_breadboard_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/093/614/medium640/temperature___humidity_BME680_Arduino_I2C_breadboard_bb.jpg?1596136892)

![temperature___humidity_BME680_Arduino_I2C_original.png](https://cdn-learn.adafruit.com/assets/assets/000/093/615/medium640/temperature___humidity_BME680_Arduino_I2C_original.png?1596136900)

# SPI Wiring

Since this is a SPI-capable sensor, we can use hardware or 'software' SPI. To make wiring identical on all microcontrollers, we'll begin with 'software' SPI. The following pins should be used:

- Connect **Vin** to the power supply, 3V or 5V is fine. Use the same voltage that the microcontroller logic is based off of
- Connect **GND** to common power/data ground
- Connect the **SCK** pin to **Digital #13** but any pin can be used later
- Connect the **SDO** pin to **Digital #12** but any pin can be used later
- Connect the **SDI** pin to **Digital #11** but any pin can be used later
- Connect the **CS** pin **Digital #10** but any pin can be used later

![adafruit_products_metro-spi_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/048/071/medium640/adafruit_products_metro-spi_bb.png?1510170026)

Later on, once we get it working, we can adjust the library to use hardware SPI if you desire, or change the pins to others.

# Install Adafruit\_BME680 library

To begin reading sensor data, you will need to [install the Adafruit\_BME680 library (code on our github repository)](https://github.com/adafruit/Adafruit_BME680 "Link: https://github.com/adafruit/Adafruit\_BME280\_Library"). It is available from the Arduino library manager so we recommend using that.

From the IDE open up the library manager...

![](https://cdn-learn.adafruit.com/assets/assets/000/048/074/medium800/adafruit_products_manage_libraries.png?1510170281)

And type in **adafruit bme680** to locate the library. Click **Install**

![](https://cdn-learn.adafruit.com/assets/assets/000/048/075/medium800/adafruit_products_bmelib.png?1510170391)

# Load Demo

Open up **File-\>Examples-\>Adafruit\_BME680**** -\>bmp680test** and upload to your microcontroller wired up to the sensor

![](https://cdn-learn.adafruit.com/assets/assets/000/048/078/medium800/adafruit_products_bme680test.png?1510170593)

Depending on whether you are using I2C or SPI, change the pin names and comment or uncomment the following lines.

```
#define BME_SCK 13
#define BME_MISO 12
#define BME_MOSI 11
#define BME_CS 10

Adafruit_BME680 bme; // I2C
//Adafruit_BME680 bme(BME_CS); // hardware SPI
//Adafruit_BME680 bme(BME_CS, BME_MOSI, BME_MISO,  BME_SCK);
```

Once uploaded, open up the serial console at 9600 baud speed to see data being printed out

![](https://cdn-learn.adafruit.com/assets/assets/000/048/080/medium800/adafruit_products_test.png?1510172030)

 **Temperature** is calculated in degrees C, you can convert this to F by using the classic F = C \* 9/5 + 32 equation.  
  
**Pressure** is returned in the SI units of **Pascals**. 100 Pascals = 1 hPa = 1 millibar. Often times barometric pressure is reported in millibar or inches-mercury. For future reference 1 pascal =0.000295333727 inches of mercury, or 1 inch Hg = 3386.39 Pascal. So if you take the pascal value of say 100734 and divide by 3386.39 you'll get 29.72 inches-Hg.

**Humidity** is returned in Relative Humidity %

**Gas** is returned as a resistance value in ohms. This value takes up to 30 minutes to stabilize! Once it stabilizes, you can use that as your baseline reading. Higher concentrations of VOC will make the resistance lower.  
  
You can also calculate Altitude. **However, you can only really do a good accurate job of calculating altitude if you know the hPa pressure at sea level for your location and day!** The sensor is quite precise but if you do not have the data updated for the current day then it can be difficult to get more accurate than 10 meters.

# Adafruit BME680

## BSEC Air Quality Library

The BME680 doesn't have built-in air quality calcualtion capabilities like other sensors like the SGP30 or CCS811. Instead, you only get temperature, pressure, humidity and gas resistance (the raw resistance value of the sensor in the BME60. So we have to use a separate library from Bosch to perform the conversion to get Air Quality values like the VOC and equivalent CO2.

The Bosch BSEC library is an all-in-one Arduino library that will get you all the values from the sensor and also perform the AQI calculations. **It is not an open source library! You can _only_ use it in Arduino and _only_ with the chipsets supported.**

Warning: Not every chipset is supported by the closed-source BSEC library! This includes the ESP32-S2 which is not supported.

We have tested the Adafruit SAMD21 (M0) series of chips and these work great. You can use an Adafruit [QT Py](https://www.adafruit.com/product/4600), [Trinket M0](https://www.adafruit.com/product/3500), [Feather M0](https://www.adafruit.com/?q=feather+m0&sort=BestMatch), etc!

[According to Bosch, ESP32 and ESP8266 are also supported](https://github.com/BoschSensortec/BSEC-Arduino-library). AVR is not recommended - you definitely **cannot fit the library into an Uno/ATmega328 or ATmega32u4** , you could try using an Arduino Mega but it isnt suggested.

Really we recommend a SAMD21 or ESP board!

# Install Library
To install Bosch's BSEC library:

- Open Arduino Library Manager
- Search for "bsec" to find the library
- In the results, find the "BSEC Software Library"
- Click Install

![](https://cdn-learn.adafruit.com/assets/assets/000/122/143/medium800/temperature___humidity_bsec_lib.png?1687891162)

Warning: 

The 1.7.1492 release of the library has a [known issue](https://github.com/boschsensortec/BSEC-Arduino-library/pull/58) that prevents compilation in the Arduino IDE. Same issue [reported here](https://community.bosch-sensortec.com/t5/MEMS-sensors-forum/bsec-datatypes-h-not-found-in-arduino-example-for-BSEC-Library/td-p/69438) in Bosch's support forum.

# Load Example & Adjust

Load up the `basic` example

![](https://cdn-learn.adafruit.com/assets/assets/000/096/457/medium800/temperature___humidity_image.png?1603816086)

We recommend adding

`while (!Serial) delay(10); // wait for console`

right after `Serial.begin` so that the console will print output after it's opened. That way any initialization error messages can be seen.

![](https://cdn-learn.adafruit.com/assets/assets/000/122/144/medium800/temperature___humidity_code_tweak.png?1687891687)

Upload to your board and open up the serial console at 115200 baud. You will see comma-separated values after some heading text:

![](https://cdn-learn.adafruit.com/assets/assets/000/122/145/medium800/temperature___humidity_Screenshot_from_2023-06-27_11-25-19.png?1687891805)

Note that some of these are calculated values. They will take a few minutes to normalize. Make sure to start your sensor in a clean air environment so it can normalize!

You can check the `basic_config_state` example if you want to calibrate the sensor, store the state in EEPROM, then re-write it on boot so you don't have to go through the normalization process.

# QT Py + OLED Demo

Here's a demo that uses a 1.3" OLED + QT Py for a plug-n-play air quality display

![](https://cdn-learn.adafruit.com/assets/assets/000/096/543/medium800thumb/temperature___humidity_bme680_demo.jpg?1603835249)

### Adafruit QT Py - SAMD21 Dev Board with STEMMA QT

[Adafruit QT Py - SAMD21 Dev Board with STEMMA QT](https://www.adafruit.com/product/4600)
What a cutie pie! Or is it... a QT Py? This diminutive dev board comes with our favorite lil chip, the SAMD21 (as made famous in our GEMMA M0 and Trinket M0 boards).

This time it comes with [our favorite connector - the STEMMA QT](http://adafruit.com/stemma), a chainable I2C...

In Stock
[Buy Now](https://www.adafruit.com/product/4600)
[Related Guides to the Product](https://learn.adafruit.com/products/4600/guides)
![Animation of Adafruit QT Py with onboard NeoPixel in a rainbow swirl.](https://cdn-shop.adafruit.com/product-videos/640x480/4600-07.jpg)

### Monochrome 1.3" 128x64 OLED graphic display - STEMMA QT / Qwiic

[Monochrome 1.3" 128x64 OLED graphic display - STEMMA QT / Qwiic](https://www.adafruit.com/product/938)
These displays are small, only about 1.3" diagonal, but very readable due to the high contrast of an OLED display. This display is made of 128x64 individual white OLED pixels, each one is turned on or off by the controller chip. Because the display makes its own light, no backlight is...

Out of Stock
[Buy Now](https://www.adafruit.com/product/938)
[Related Guides to the Product](https://learn.adafruit.com/products/938/guides)
![Monochrome 1.3" OLED module with Adafruit logos falling like snow](https://cdn-shop.adafruit.com/product-videos/640x480/938-05.jpg)

### STEMMA QT / Qwiic JST SH 4-pin Cable - 100mm Long

[STEMMA QT / Qwiic JST SH 4-pin Cable - 100mm Long](https://www.adafruit.com/product/4210)
This 4-wire cable is a little over 100mm / 4" long and fitted with JST-SH female 4-pin connectors on both ends. Compared with the chunkier JST-PH these are 1mm pitch instead of 2mm, but still have a nice latching feel, while being easy to insert and remove.

<a...></a...>

Out of Stock
[Buy Now](https://www.adafruit.com/product/4210)
[Related Guides to the Product](https://learn.adafruit.com/products/4210/guides)
![Angled shot of STEMMA QT / Qwiic JST SH 4-pin Cable.](https://cdn-shop.adafruit.com/640x480/4210-00.jpg)

![](https://cdn-learn.adafruit.com/assets/assets/000/096/475/medium800/temperature___humidity_image.png?1603817000)

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/BME680_BSEC_OLED_Demo/BME680_BSEC_OLED_Demo.ino

# Adafruit BME680

## Arduino Library Docs

# Adafruit BME680

## Python & CircuitPython

It's easy to use the BME680 sensor with Python and CircuitPython, and the&nbsp;[Adafruit CircuitPython BME680](https://github.com/adafruit/Adafruit_CircuitPython_BME680)&nbsp;module.&nbsp; This module allows you to easily write Python code that reads the humidity, temperature, pressure, and more from the sensor.

You can use this sensor with any CircuitPython microcontroller board or with a computer that has GPIO and Python [thanks to Adafruit\_Blinka, our CircuitPython-for-Python compatibility library](https://learn.adafruit.com/circuitpython-on-raspberrypi-linux).

# CircuitPython Microcontroller Wiring

First wire up a BME680 to your board exactly as shown on the previous pages for Arduino.&nbsp; Here's an example of wiring a Feather M0 to the sensor with I2C:

- **Board 3V** &nbsp;to&nbsp;**sensor VIN (red wire on STEMMA QT version)**  
- **Board GND** &nbsp;to&nbsp;**sensor GND (black wire on STEMMA QT version)**  
- **Board SCL** &nbsp;to&nbsp;**sensor SCK (yellow wire on STEMMA QT version)**  
- **Board SDA** &nbsp;to&nbsp;**sensor SDI (blue wire on STEMMA QT version)**  

![temperature___humidity_BME680_FeatherM4_I2C_STEMMA_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/093/617/medium640/temperature___humidity_BME680_FeatherM4_I2C_STEMMA_bb.jpg?1596137196)

![temperature___humidity_BME680_FeatherM4_I2C_breadboard_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/093/619/medium640/temperature___humidity_BME680_FeatherM4_I2C_breadboard_bb.jpg?1596137274)

![temperature___humidity_BME680_FeatherM0_I2C_original.png](https://cdn-learn.adafruit.com/assets/assets/000/093/620/medium640/temperature___humidity_BME680_FeatherM0_I2C_original.png?1596137305)

# Python Computer Wiring

Since there's _dozens_ of Linux computers/boards you can use we will show wiring for Raspberry Pi. For other platforms, [please visit the guide for CircuitPython on Linux to see whether your platform is supported](https://learn.adafruit.com/circuitpython-on-raspberrypi-linux).&nbsp;

Here's the Raspberry Pi wired with I2C:

- **Pi 3V3** to **sensor VIN (red wire on STEMMA QT version)**  
- **Pi GND** to **sensor GND (black wire on STEMMA QT version)**
- **Pi SCL** to **sensor SCK (yellow wire on STEMMA QT version)**
- **Pi SDA** to **sensor SDI (blue wire on STEMMA QT version)**

![temperature___humidity_BME680_RasPi_I2C_STEMMA_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/093/622/medium640/temperature___humidity_BME680_RasPi_I2C_STEMMA_bb.jpg?1596137424)

![temperature___humidity_BME680_RasPi_I2C_breadboard_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/093/623/medium640/temperature___humidity_BME680_RasPi_I2C_breadboard_bb.jpg?1596137475)

![temperature___humidity_BME680_RasPi_I2C_original.jpg](https://cdn-learn.adafruit.com/assets/assets/000/093/624/medium640/temperature___humidity_BME680_RasPi_I2C_original.jpg?1596137500)

# CircuitPython Installation of BME680 Library

Next you'll need to install the&nbsp;[Adafruit CircuitPython BME680](https://github.com/adafruit/Adafruit_CircuitPython_BME680)&nbsp;library on your CircuitPython board.&nbsp;&nbsp;

First make sure you are running the&nbsp;[latest version of Adafruit CircuitPython](../../../../welcome-to-circuitpython/installing-circuitpython)&nbsp;for your board.

Next you'll need to install the necessary libraries&nbsp;to use the hardware--carefully follow the steps to find and install these libraries from&nbsp;[Adafruit's CircuitPython library bundle](https://github.com/adafruit/Adafruit_CircuitPython_Bundle).&nbsp; Our introduction guide has&nbsp;[a great page on how to install the library bundle](../../../../welcome-to-circuitpython/circuitpython-libraries)&nbsp;for both express and non-express boards.

Remember for non-express boards like the, you'll need to manually install the necessary libraries from the bundle:

- **adafruit\_bme680.mpy**
- **adafruit\_bus\_device**

You can also download the&nbsp; **adafruit\_bme680.mpy** &nbsp;from&nbsp;[its releases page on Github](https://github.com/adafruit/Adafruit_CircuitPython_BME680/releases).

Before continuing make sure your board's lib folder or root filesystem has the&nbsp; **adafruit\_bme680.mpy,&nbsp;** and **&nbsp;adafruit\_bus\_device**** &nbsp; **files and folders** &nbsp;**copied over.

Next[&nbsp;connect to the board's serial REPL](https://learn.adafruit.com/welcome-to-circuitpython/the-repl) so you are at the CircuitPython&nbsp; **\>\>\>** &nbsp;prompt.

# Python Installation of BME680 Library

You'll need to install the Adafruit\_Blinka library that provides the CircuitPython support in Python. This may also require enabling I2C on your platform and verifying you are running Python 3. [Since each platform is a little different, and Linux changes often, please visit the CircuitPython on Linux guide to get your computer ready](https://learn.adafruit.com/circuitpython-on-raspberrypi-linux)!

Once that's done, from your command line run the following command:

- `sudo pip3 install adafruit-circuitpython-bme680`

If your default Python is version 3 you may need to run 'pip' instead. Just make sure you aren't trying to use CircuitPython on Python 2.x, it isn't supported!

# CircuitPython & Python Usage

To demonstrate the usage of the sensor we'll initialize it and read the temperature, humidity, and more from the board's Python REPL.

Run the following code to import the necessary modules and initialize the I2C connection with the sensor:

```python
import board
import adafruit_bme680
i2c = board.I2C()
sensor = adafruit_bme680.Adafruit_BME680_I2C(i2c)
```

Now you're ready to read values from the sensor using any of these properties:

- **temperature** &nbsp;- The sensor temperature in degrees Celsius.
- **gas** - The resistance (in Ohms) of the gas sensor.&nbsp; This is proportional to the amount of VOC particles in the air.
- **humidity** &nbsp;- The percent humidity as a value from 0 to 100%.
- **pressure** &nbsp;- The pressure in hPa.
- **altitude** &nbsp;- The altitude in meters.

```
print('Temperature: {} degrees C'.format(sensor.temperature))
print('Gas: {} ohms'.format(sensor.gas))
print('Humidity: {}%'.format(sensor.humidity))
print('Pressure: {}hPa'.format(sensor.pressure))
```

![](https://cdn-learn.adafruit.com/assets/assets/000/048/207/medium800/temperature_Screen_Shot_2017-11-14_at_2.43.11_PM.png?1510699444)

For altitude you'll want to set the pressure at sea level for your location to get the most accurate measure (remember these sensors can only infer altitude based on pressure and need a set calibration point).&nbsp; Look at your local weather report for a pressure at sea level reading and set the **sea\_level\_presure** (we formerly said it was **seaLevelhPA** ):

```auto
sensor.sea_level_pressure = 1014.5
```

Then read the altitude property for a more accurate altitude reading (but remember this altitude will fluctuate based on atmospheric pressure changes!):

```
print('Altitude: {} meters'.format(sensor.altitude))
```

![](https://cdn-learn.adafruit.com/assets/assets/000/048/208/medium800/temperature_Screen_Shot_2017-11-14_at_2.46.35_PM.png?1510699621)

That's all there is to using the BME680 sensor with CircuitPython!

# Full Example Code
https://github.com/adafruit/Adafruit_CircuitPython_BME680/blob/main/examples/bme680_simpletest.py

# Adafruit BME680

## Python Docs

# Adafruit BME680

## WipperSnapper

![](https://cdn-learn.adafruit.com/assets/assets/000/123/775/medium800/temperature___humidity_Screenshot_2023-08-15_163525.png?1692752722)

## What is WipperSnapper

WipperSnapper is a firmware designed to turn any WiFi-capable board into an Internet-of-Things device without programming a single line of code. WipperSnapper connects to [Adafruit IO](https://io.adafruit.com/), a web&nbsp;platform designed ([by Adafruit!](https://www.adafruit.com/about)) to&nbsp;_display_,&nbsp;_respond_, and&nbsp;_interact_&nbsp;with your project's data.

Simply load the WipperSnapper firmware onto your board, add credentials, and plug it into power. Your board will automatically register itself with your Adafruit IO account.

From there, you can add&nbsp;_components_&nbsp;to your board such as buttons, switches, potentiometers, sensors, and more! Components are&nbsp;_dynamically&nbsp;_added to hardware, so you can&nbsp;immediately start interacting, logging, and streaming the data your projects produce without writing code.

If you've never used WipperSnapper, click below to read through the quick start guide before continuing.

[Quickstart: Adafruit IO WipperSnapper](https://learn.adafruit.com/quickstart-adafruit-io-wippersnapper)
## Wiring
First, wire up a BME680 to your board exactly as follows. Here is an example of the BME680 wired to an&nbsp;[Adafruit ESP32 Feather V2](https://www.adafruit.com/product/5400)&nbsp;using I2C&nbsp;[with a STEMMA QT cable (no soldering required)](https://www.adafruit.com/product/4210)

- **Board 3V** &nbsp;to&nbsp;**sensor VIN (red wire on STEMMA QT)**  
- **Board GND** &nbsp;to&nbsp;**sensor GND (black wire on STEMMA QT)**  
- **Board SCL** &nbsp;to&nbsp;**sensor SCK (yellow wire on STEMMA QT)**  
- **Board SDA** &nbsp;to&nbsp;**sensor SDI (blue wire on STEMMA QT)**

![Circuit showing BME680 joined to Feather with Stemma QT / Qwiic / JST-SH 4-pin cable.](https://cdn-learn.adafruit.com/assets/assets/000/123/786/medium640/temperature___humidity_BME688_bb.png?1692801323)

![Breadboard showing BME680 joined to Feather with the wiring as described](https://cdn-learn.adafruit.com/assets/assets/000/123/941/medium640/temperature___humidity_BME688_Breadboard_bb.png?1692971510)

## Usage

Connect your board to Adafruit IO Wippersnapper and **[navigate to the WipperSnapper board list](https://io.adafruit.com/wippersnapper).**

On this page, **select the WipperSnapper board you're using** to be brought to the board's interface page.

![](https://cdn-learn.adafruit.com/assets/assets/000/128/242/medium800/temperature___humidity_adafruit_products_02_DeviceSelection_croppped.png?1709159076)

If you do not see your board listed here - you need [to connect your board to Adafruit IO](https://learn.adafruit.com/quickstart-adafruit-io-wippersnapper) first.

On the device page, quickly&nbsp; **check that you're running the latest version of the WipperSnapper firmware**.

The device tile on the left indicates the version number of the firmware running on the connected board.

- **If the firmware version is green with a checkmark -** &nbsp;continue with this guide.
- **If the firmware version is red with an exclamation mark "!" -** &nbsp;[update to the latest WipperSnapper firmware](https://learn.adafruit.com/quickstart-adafruit-io-wippersnapper)&nbsp;on your board before continuing.

![temperature___humidity_CroppedVersion.png](https://cdn-learn.adafruit.com/assets/assets/000/123/793/medium640/temperature___humidity_CroppedVersion.png?1692733433)

![temperature___humidity_DeviceListPage_UpdateRequired.png](https://cdn-learn.adafruit.com/assets/assets/000/123/794/medium640/temperature___humidity_DeviceListPage_UpdateRequired.png?1692733375)

Next, make sure the sensor is plugged into your board and click the **&nbsp;I2C Scan&nbsp;** button.

![](https://cdn-learn.adafruit.com/assets/assets/000/113/177/medium800/sensor_page_crop_scan.png?1657724520)

You should see the BME680's default I2C address of `0x77`&nbsp;pop-up in the I2C scan list.

![](https://cdn-learn.adafruit.com/assets/assets/000/123/797/medium800/temperature___humidity_Screenshot_2023-08-22_174635.png?1692733452)

###  I don't see the sensor's I2C address listed! 


First, double-check the connection and/or wiring between the sensor and the board.

Then, reset the board and let it re-connect to Adafruit IO WipperSnapper.

With the sensor detected in an I2C scan, you're ready to add the sensor to your board.

**Click the New Component button or the + button** to bring up the component picker.

![](https://cdn-learn.adafruit.com/assets/assets/000/127/931/medium800/sensor_page_temperature___humidity_06_AddComponent.png?1708631009)

Adafruit IO supports a large amount of components. To quickly find your sensor, type&nbsp;`BME68`&nbsp;into the search bar, then select the&nbsp; **BME680** or **BME688** component.

![](https://cdn-learn.adafruit.com/assets/assets/000/128/243/medium800/temperature___humidity_paSolh5uHP.png?1709159651)

On the component configuration page, the BME680's sensor address should be listed along with the sensor's settings.

The&nbsp; **Send Every** &nbsp;option is specific to each sensor's measurements. This option will tell the Feather how often it should read from the BME680 sensor and send the data to Adafruit IO. Measurements can range from every 30 seconds to every 24 hours.

For this example, set the&nbsp; **Send Every&nbsp;** interval to every 30 seconds. Don't forget to scroll down as there are 6 sensor metrics / feeds to select. On a small screen you may only see the first 3 and then wonder why altitude isn't updating (it will still be set to the default of every 15 minutes)

![](https://cdn-learn.adafruit.com/assets/assets/000/123/876/medium800/temperature___humidity_Screenshot_2023-08-22_192758.png?1692800420)

Your device interface should now show the sensor components you created. After the interval you configured elapses, WipperSnapper will automatically read values from the sensor(s) and send them to Adafruit IO.

![](https://cdn-learn.adafruit.com/assets/assets/000/123/877/medium800/temperature___humidity_Screenshot_2023-08-22_193417.png?1692800319)

To view the data that has been logged from the sensor, click on the graph next to the sensor name.

![](https://cdn-learn.adafruit.com/assets/assets/000/123/879/medium800/temperature___humidity_Screenshot_2023-08-22_193417.png?1692800894)

Here you can see the feed history and edit things about the feed such as the name, privacy, webhooks associated with the feed and more. If you want to learn more about how feeds work, [check out this page](https://learn.adafruit.com/all-the-internet-of-things-episode-four-adafruit-io/advanced-feeds).

![](https://cdn-learn.adafruit.com/assets/assets/000/123/878/medium800/temperature___humidity_Screenshot_2023-08-22_194741.png?1692800381)

# Adafruit BME680

## Downloads

# Files

- [Fritzing object in Adafruit Fritzing library](https://github.com/adafruit/Fritzing-Library/)
- [EagleCAD PCB files on github](https://github.com/adafruit/Adafruit-BME680-PCB)
- [BME680 3D models on GitHub](https://github.com/adafruit/Adafruit_CAD_Parts/tree/main/3660%20BME680)
- [BME680 Datasheet](https://cdn-shop.adafruit.com/product-files/3660/BME680.pdf)
- [BME688 3d models on GitHub](https://github.com/adafruit/Adafruit_CAD_Parts/tree/main/5046%20BME688%20Sensor)

More reading:

- [The next generation of low-cost personal air quality sensors forquantitative exposure monitoring](https://cdn-learn.adafruit.com/assets/assets/000/047/741/original/nextgen.pdf?1509307283)
- [New small, low-power MOX VOC sensors: how might they](https://cdn-learn.adafruit.com/assets/assets/000/047/742/original/ATA1701_VOCs_and_IAQ_FINAL_ENG-wp.pdf?1509307332)  
[be used for indoor air quality monitoring?](https://cdn-learn.adafruit.com/assets/assets/000/047/742/original/ATA1701_VOCs_and_IAQ_FINAL_ENG-wp.pdf?1509307332)

# Schematic & Fabrication Print - STEMMA QT Version
![](https://cdn-learn.adafruit.com/assets/assets/000/093/625/medium800/temperature___humidity_BME680_STEMMA_sch.png?1596137953)

![](https://cdn-learn.adafruit.com/assets/assets/000/093/626/medium800/temperature___humidity_BME680_STEMMA_fab_print.png?1596137990)

# Schematic & Fabrication Print - Original Version
![](https://cdn-learn.adafruit.com/assets/assets/000/048/082/medium800/temperature_schem.png?1510177037)

![](https://cdn-learn.adafruit.com/assets/assets/000/048/081/medium800/temperature_fabprint.png?1510177000)


## Primary Products

### Adafruit BME680 - Temperature, Humidity, Pressure and Gas Sensor

[Adafruit BME680 - Temperature, Humidity, Pressure and Gas Sensor](https://www.adafruit.com/product/3660)
The long awaited BME680 from Bosch gives you&nbsp;_all the environmental sensing you want_&nbsp;in one small package. This little sensor contains&nbsp; **temperature** ,&nbsp; **humidity** ,&nbsp; **barometric pressure,** &nbsp;and&nbsp; **VOC...**

In Stock
[Buy Now](https://www.adafruit.com/product/3660)
[Related Guides to the Product](https://learn.adafruit.com/products/3660/guides)
### Adafruit BME688 - Temperature, Humidity, Pressure and Gas Sensor

[Adafruit BME688 - Temperature, Humidity, Pressure and Gas Sensor](https://www.adafruit.com/product/5046)
The long-awaited BME688 from Bosch gives you&nbsp;_all the environmental sensing you want_&nbsp;in one small package. This little sensor contains&nbsp; **temperature** ,&nbsp; **humidity** ,&nbsp; **barometric pressure,** &nbsp;and&nbsp; **VOC...**

In Stock
[Buy Now](https://www.adafruit.com/product/5046)
[Related Guides to the Product](https://learn.adafruit.com/products/5046/guides)

## Related Guides

- [Raspberry Pi Azure IoT Hub Dashboard with CircuitPython](https://learn.adafruit.com/raspberry-pi-iot-dashboard-with-azure-and-circuitpython.md)
- [Air Quality Sensor 3D Printed Enclosure](https://learn.adafruit.com/air-quality-sensor-silo-house.md)
- [Getting Started with Microsoft Azure and CircuitPython](https://learn.adafruit.com/getting-started-with-microsoft-azure-and-circuitpython.md)
- [OpenClaw on Raspberry Pi](https://learn.adafruit.com/openclaw-on-raspberry-pi.md)
- [Digi-Key IoT Studio Mini Smart Home](https://learn.adafruit.com/digikey-iot-studio-smart-home.md)
- [Monitor Your Greenhouse with a No-Code Environmental Sensor](https://learn.adafruit.com/monitor-your-greenhouse-with-a-no-code-environmental-sensor.md)
- [MAX31855 Thermocouple Sensor Python Library](https://learn.adafruit.com/max31855-thermocouple-python-library.md)
- [4x12 Ortho Mechanical Keyboard](https://learn.adafruit.com/4x12-ortho-mechanical-keyboard.md)
- [Improve Your Code with Pylint and Black](https://learn.adafruit.com/improve-your-code-with-pylint.md)
- [NeoPixel Ring Lamp](https://learn.adafruit.com/neopixel-ring-lamp.md)
- [Adafruit Wiz5500 Ethernet Co-Processor Breakout Board](https://learn.adafruit.com/adafruit-wiz5500-ethernet-co-processor-breakout-board.md)
- [Adafruit DS2482S-800 8 Channel I2C to 1-Wire Bus Adapter](https://learn.adafruit.com/adafruit-ds2482s-800-8-channel-i2c-to-1-wire-bus-adapter.md)
- [Adafruit Feather M4 CAN Express](https://learn.adafruit.com/adafruit-feather-m4-can-express.md)
- [Improved AMG8833 PyGamer Thermal Camera](https://learn.adafruit.com/improved-amg8833-pygamer-thermal-camera.md)
- [Adafruit OPT4048 XYZ Color Sensor](https://learn.adafruit.com/adafruit-opt4048-xyz-color-sensor.md)
