Comments (6)
I will have a look at it. Doesn't seem too different from the BMP180 and BME280, so integrating it should not be that hard for me :)
from esphome.
I bought a bunch of these sensors a while back before I found the HTU21D. For temperature-only things are BMP280 still useful, don't care much about the pressure 😉.
Well, if I'm the only user then it doesn't make sense to integrate it.
from esphome.
I tried to use the BME280 and make a BMP280 out of it. Only partial success, readings are off because it seems that I'm not able to initialize the sensor properly.
from esphome.
I have a GY-21P Breakout which I understand is a BMP280 combined with SI7021 for temperature and humdity (although honestly I only care about temperature).
It would be great to be able to use this with esphomeyaml.
from esphome.
hi guys. Im trying to work with 02 bmp280 sensors, but only one has working. im using spi protocol. someone can help me?? im studying arduino, very unprofessional. I already tested the two sensors individually. are working perfectly.
/***************************************************************************
This is a library for the BMP280 humidity, temperature & pressure sensor
Designed specifically to work with the Adafruit BMEP280 Breakout
----> http://www.adafruit.com/products/2651
These sensors use I2C or SPI to communicate, 2 or 4 pins are required
to interface.
Adafruit invests time and resources providing this open source code,
please support Adafruit andopen-source hardware by purchasing products
from Adafruit!
Written by Limor Fried & Kevin Townsend for Adafruit Industries.
BSD license, all text above must be included in any redistribution
***************************************************************************/
#include <Wire.h>
#include <SPI.h>
#include <RTClib.h> //Incremento Taccola 10/04
#include <Adafruit_Sensor.h>
#include <Adafruit_BMP280.h>
#define BMP_SCK 13
#define BMP_MISO 12
#define BMP_MOSI 11
#define BMP_CS 10
#define BMP2_SCK 08 //incremento taccola 31/07
#define BMP2_MISO 07 //incremento taccola 31/07
#define BMP2_MOSI 06 //incremento taccola 31/07
#define BMP2_CS 05 //incremento taccola 31/07
RTC_DS1307 RTC; // Incremento Taccol 10/04
//Adafruit_BMP280 bme; // I2C
Adafruit_BMP280 bme(BMP_CS); // hardware SPI
Adafruit_BMP280 bme2(BMP2_CS); //incremento taccola 31/07
//Adafruit_BMP280 bme(BMP_CS, BMP_MOSI, BMP_MISO, BMP_SCK);
void setup() {
Serial.begin(9600);
Wire.begin(); // Incremento Taccola 10/04
RTC.begin(); // Incremento Taccola 10/04
RTC.adjust(DateTime(DATE, TIME)); // Incremento Taccola 10/04
Serial.println(F("BMP280 test"));
if (!bme.begin()) {
Serial.println("Could not find a valid BMP280 sensor, check wiring!");
while (1);
}
if (!bme2.begin()) {
Serial.println("Could not find a valid BMP280_2 sensor, check wiring!");
while (1); //incremento taccola 31/07
}
}
void loop() {
DateTime now = RTC.now(); // Incremento Taccola 10/04
Serial.print("Temperature = ");
Serial.print(bme.readTemperature());
Serial.println(" *C");
Serial.print("Pressure = ");
Serial.print(bme.readPressure());
Serial.println(" Pa");
Serial.print("Pressure = ");
Serial.print(bme.readPressure()/100000);
Serial.println(" Atm");
Serial.print("Approx altitude = ");
Serial.print(bme.readAltitude(1018.0)); // this should be adjusted to your local forcase
Serial.println(" m");
Serial.println("");
Serial.print("Temperature = "); //incremento taccola 31/07
Serial.print(bme2.readTemperature());
Serial.println(" *C");
Serial.print("Pressure = "); //incremento taccola 31/07
Serial.print(bme2.readPressure());
Serial.println(" Pa");
Serial.print("Pressure = "); //incremento taccola 31/07
Serial.print(bme2.readPressure()/100000);
Serial.println(" Atm");
Serial.print("Approx altitude = ");
Serial.print(bme2.readAltitude(1018.0)); // this should be adjusted to your local forcase
Serial.println(" m");
Serial.print(now.year(), DEC); // Incremento Taccola 10/04
Serial.print('/');
if (now.month() < 10) {
Serial.print('0');
}
Serial.print(now.month(), DEC); // Incremento Taccola 10/04
Serial.print('/');
if (now.day() < 10) {
Serial.print('0');
}
Serial.print(now.day(), DEC); // Incremento Taccola 10/04
Serial.print(' ');
if (now.hour() < 10) {
Serial.print('0');
}
Serial.print(now.hour(), DEC); // Incremento Taccola 10/04
Serial.print(':');
if (now.minute() < 10) {
Serial.print('0');
}
Serial.print(now.minute(), DEC); // Incremento Taccola 10/04
Serial.print(':');
if (now.second() < 10) {
Serial.print('0');
}
Serial.print(now.second(), DEC); // Incremento Taccola 10/04
Serial.println();
Serial.println();
delay(15000);
}
from esphome.
Support is done: https://esphomelib.com/esphomeyaml/components/sensor/bmp280.html
from esphome.
Related Issues (20)
- Buttons should be published by raising events in Home Assistant HOT 1
- Issue Title HOT 2
- Missing `f` prefix on f-strings HOT 1
- esp8285 reboot due to incorrect API or wireless timeout HOT 6
- ESPhome reboot at various intervals
- Create SECURITY.md HOT 2
- Typo in oversampling 32x HOT 1
- adafruit_qtpy_esp32 neopixel gpio8 HOT 1
- New PMS5003T HOT 2
- I2S Media Player not working for ESP32 S2 based boards
- ESPHOME and NGINX Proxy Manager SSL proxy HA addon don't play nicely HOT 1
- Unable to compile new firmware for BT Proxies HOT 1
- missing ADC2 register on ESP32-S3 HOT 1
- Can be deleted
- AC dimmer - phase delay calculation
- Delete the `packages` directory in the `.platformio` directory and try again. It's probably at `/home/esphome/.platformio`. If that doesn't work, then delete the entire `.platformio` directory. HOT 4
- M5StickC support for Rhasspy or Home assistant voice control HOT 1
- response_size (Required): Number of bytes of the response HOT 1
- Please add missing code for climate
- Error compiling yaml with ssl_fingerprints HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esphome.