『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
查看: 144|回复: 2

[学习笔记] 记录一下 GY-BME280-5V 地址是0x76

[复制链接]

8

主题

89

帖子

489

积分

中级会员

Rank: 3Rank: 3

积分
489
金钱
400
HASS币
0
发表于 2024-4-9 23:03:05 | 显示全部楼层 |阅读模式
注意GY-BME280-5V 地址是0x76,不是官网例程里面的0x77
screenshot-1712674689104.png screenshot-1712674625784.png
###BME280 温度 + 压力 + 湿度传感器 地址0x76
  - platform: bme280_i2c
    i2c_id: bus_a
    temperature:
      name: "BME280 Temperature"
      id: bme280_temperature
    pressure:
      name: "BME280 Pressure"
      id: bme280_pressure
    humidity:
      name: "BME280 Relative Humidity"  
      id: bme280_humidity
    address: 0x76
    update_interval: 1s

  - platform: template
    name: "Altitude" 
    lambda: |-
      const float STANDARD_SEA_LEVEL_PRESSURE = 1013.25; //in hPa, see note
      return ((id(bme280_temperature).state + 273.15) / 0.0065) *
        (powf((STANDARD_SEA_LEVEL_PRESSURE / id(bme280_pressure).state), 0.190234) - 1); // in meter
    update_interval: 1s
    icon: 'mdi:signal'
    unit_of_measurement: 'm'

  - platform: absolute_humidity
    name: "Absolute Humidity"   
    temperature: bme280_temperature
    humidity: bme280_humidity

  - platform: template
    name: "Dew Point"  
    lambda: |-
      return (243.5*(log(id(bme280_humidity).state/100)+((17.67*id(bme280_temperature).state)/
      (243.5+id(bme280_temperature).state)))/(17.67-log(id(bme280_humidity).state/100)-
      ((17.67*id(bme280_temperature).state)/(243.5+id(bme280_temperature).state))));
    unit_of_measurement: °C
    icon: 'mdi:thermometer-alert'

回复

使用道具 举报

11

主题

287

帖子

2031

积分

金牌会员

Rank: 6Rank: 6

积分
2031
金钱
1744
HASS币
0
发表于 2024-4-10 04:09:49 | 显示全部楼层
我用BMP280  代碼是0x77

  - platform: aht10
  #  address: 0x38
    temperature:
      name: "AHT20 Temperature"
    humidity:
      name: "AHT20 Humidity"
    update_interval: 15s
    
  - platform: bmp280
    temperature:
      name: "BMP280 Temperature"
      oversampling: 16x
    pressure:
      name: "BMP280 Pressure"
    address: 0x77
    update_interval: 15s
回复

使用道具 举报

1

主题

39

帖子

244

积分

中级会员

Rank: 3Rank: 3

积分
244
金钱
205
HASS币
0
发表于 2024-4-12 10:10:44 | 显示全部楼层
模块的图片上,BMP280附近有个3个焊盘,那是个跳线,默认接到GND,i2c地址就是0x76,如果接VDD,就是0X77

评分

参与人数 1金钱 +5 收起 理由
qxdnzx + 5 论坛有你更精彩!

查看全部评分

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-4-30 14:38 , Processed in 0.181582 second(s), 28 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表