微信扫码登录
58
1457
6861
元老级技术达人
alei643 发表于 2023-12-4 13:37 ESP8266只支持一个I2C设备?我家里的用的几年前买的NodeMCU,还有sonoff SV都是挂了两个I2C的传感器的啊 ...
使用道具 举报
17
196
2200
金牌会员
i2c: sda: GPIO1 scl: GPIO3 sensor: - platform: bh1750 name: "光传感器" address: 0x23 update_interval: 2s - platform: aht10 temperature: name: "AHT_wen_du_186" id: AHT_wen_du_186 humidity: name: "AHT_shi_du_186" id: AHT_shi_du_186 address: 0x38 update_interval: 60s - platform: bmp085 temperature: name: "bmp180_wen_du_186" id: bmp180_wen_du_186 pressure: name: "bmp180_qi_ya_186" id: bmp180_qi_ya_186 address: 0x77 update_interval: 60s
38
367
4384
4
47
372
中级会员
csl0524 发表于 2023-12-4 13:57 我用的esp01s接了三个I2C可以正常使用,但是是三个不同设备
23
234
1687
xubin1012 发表于 2023-12-4 11:34 这是代码
i2c: - id: bus_a sda: D4 scl: D3 scan: True sensor: - platform: wifi_signal name: "140 Home1 wifi" update_interval: 600s - platform: bh1750 i2c_id: bus_a name: "140 BH1750 Illuminance" address: 0x23 update_interval: 60s
xubin1012 发表于 2023-12-4 14:28 引脚串联到一起了吗
trz0332 发表于 2023-12-4 14:23 你这个写法,,2个传感器用的2个地址,如果你能该地址的话,那为什么要2个I2C接口呢?还有就是,如果你要设 ...
linoul 发表于 2023-12-4 13:52 BH1750模块还有个引脚 接地和接VCC i2c的地址会变 看下手册吧 就是只配置一个i2c引脚 然后修改地址值就行了 ...
365
3665
本版积分规则 发表回复 回帖后跳转到最后一页
Archiver|手机版|小黑屋|Hassbian ( 晋ICP备17001384号-1 )
GMT+8, 2025-7-10 01:10 , Processed in 0.056718 second(s), 9 queries , MemCached On.
Powered by Discuz! X3.5
© 2001-2025 Discuz! Team.