Data Logging BME280
Readings from BME280 sensor can be published online to Google Sheets using 3rd party service IFTTT. There are several configuration needed included creating an IFTTT account. IFTTT will act as a webhook service that publishes the readings from BME280 to Google Sheets every 15 minutes. The image below shows this project flow.
The first step in this project is creating an IFTTT account. Go to the official site ifttt.com and enter an email to get started.
Then create a new applet with webhooks service. Choose the “Receive a web request” trigger and give a name to the event such as “bme280_readings”.
Then choose Google Sheets service and connect to it. The IFTTT will add a row to spreadsheet for every action taken.
After it’s done get the API key. Go to ifttt.com/maker_webhooks, and click the “Documentation” button.
Then copy the unique API key shown. We are done with IFTTT settings. Now we can integrate IFTTT with ESP32.
Get Adi H’s stories in your inbox
Join Medium for free to get updates from this writer.
Parts we need:
1. ESP32
2. BME280 sensor
3. Breadboard
4. Jumper wires
The wiring is the same as shown on previous project. Pair the SDI pin to GPIO 21 (SDA) pin and SCK pin to GPIO 22 (SCL). Then connect the power cable. The schematic looks like diagram below:
Next we have to install BME280 sensor library and Adafruit sensor library. Those libraries are available from Arduino IDE Library Manager. Go to Sketch -> Include Library -> Manage Libraries. Search for “adafruit bme280” and “adafruit unified sensor” in the search box. Install them and restart the Arduino IDE.
After installing libraries, we use code below to get BME280 reading. But we have to change several things from the code. First, we change the network SSID and password to “wifi” and “password123”. We also set the unique IFTTT URL resource from API key above. Finally, we set the sleep time to 15 minutes or 900 seconds. This means the ESP32 will wake up, takes the readings, and publishes in Google Sheets every 15 minutes. Don’t set the time to a very short period, because it could exceed the limit of request from IFTTT service.
Then upload the code to ESP32. Every 15 minutes, it takes sensor readings and publishes them in Google Sheets. The picture below shows our result.
Well, we didn’t have any problem and the project was done successfully at the first try. Thanks to my teammate who did a lot of works!
Thank you for reading my story!








