Code Monkey home page Code Monkey logo

esp32-cam_bme_280_bme680_esphome's Introduction

ESP32-CAM & BME280/680 & Home Assistant & ESPHome integration

Using ESP32-CAM (AI-Thinker) with Bosch Sensors BME280/BME680 via I2C and its integration into Home Assistant via Esphome. With some small modifications you can use this code also for other boards e.g. ESP01/ESP12/... which I already tried as well. Focus here is NOT to show how to do flashing via esptool, just to share YAML configuration file used for flashing of microcontroller by esptool to save your time in development phase.

Note: BME280 is a temperature sensor. BME680 has additionally a gas sensor.

Intro

I was personally struggling to find out comprehensive tutorial, how to integrate ESP32-CAM together with any kind of Bosch sensor via I2C. The main motivation had been to use just one microcontroller (in this case ESP32-CAM) for everything - camera & temperature/gas sensor.

Wiring

Here pinout of ESP32-CAM. The GPIO names are important to set I2C correctly. To this point we will come again when we write the code.

Image source: RandomNerdTutorials.com

obrazek

Here my complete wiring:

obrazek

Here you find a sketch made in Fritzing.

Be careful: BME280/680 are sensor with supply power 3.3V! ESP-CAM works with both 3.3/5V, but for better stability I recommend to use 5V.

Code

Here complete YAML file for ESP32-CAM & BME280.

Based on the ESP32 (or other microcontroller) pinout, you have to define the right I2C pins. In my case I used GPIO13 as SDA and GPIO12 as scl (see wiring above). You can change it as you wish, but then you need to use the right pins. Another very important thing is to use correct sensor address - in my case 0x76, other option is e.g. 0x77.

Here a default example from ESPHome web site about ESP32-CAM.

Integration

This is an example, how it looks like in Home Assistant:

obrazek

Image

obrazek obrazek

esp32-cam_bme_280_bme680_esphome's People

Contributors

zbj3ji avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.