最近买了gy bme280并试图将它与Esp8266 Nodemcu V3 Esp 12连接。
我几天前从大师那里建立了https://nodemcu-build.com/的固件。
调试日志显示此
Queue empty
Running
Function platform_gpio_mode() is called. pin_mux:1610614844, func:0
Function platform_gpio_mode() is called. pin_mux:1610614848, func:0
i2c setup result --> 100000
mode: b7
humidity oss: 5
config: f0
No ACK on address: 76
No ACK on address: 77
bme280 setup result -->
nil
pm open,type:2 0
我的代码
srv = net.createServer(net.TCP)
scl = 1
sda = 2
i2cResult = i2c.setup(0, sda, scl, i2c.SLOW) -- call i2c.setup() only once
print("i2c setup result --> " .. i2cResult)
local bmeResult = bme280.setup()
print("bme280 setup result --> ")
print(bmeResult)
我有BME280和ESP8266之间的连接
SDO - > ģ
CSB - > 3V
SDA - > D2
SCL - > D1
VCC - > 3V
GND - > ģ
知道什么是失败的,或者我还能做些什么来排除故障?