If you are asking a question, please follow this template:
-
My goal is:
Use BME280 sensor with ESP32 by following GitHub - mongoose-os-apps/example-arduino-adafruit-bme280-js -
My actions are:
git clone https://github.com/mongoose-os-apps/example-arduino-adafruit-bme280-js.git && cd example-arduino-adafruit-bme280-js
mos build --platform esp32
mos flash
mos config-set i2c.scl_gpio=22 i2c.sda_gpio=23
- The result I see is:
[May 1 18:24:02.101] Temperature: 21474836.470000 *C
[May 1 18:24:02.101] Humidity: 21474836.470000 %RH
[May 1 18:24:02.101] Pressure: 214748.364700 hPa
- My expectation & question is:
[May 1 18:24:02.101] Temperature: 22.960000 *C
[May 1 18:24:02.101] Humidity: 43.650000 %RH
[May 1 18:24:02.101] Pressure: 1025.692000 hPa
Hi
First of all, thank you very much for sharing the app
The build and flash look works fine, I2C init ok
[May 1 18:24:02.101] esp32_i2c_master.c:393 I2C0 init ok (SDA: 23, SCL: 22, freq: 100000)
But I am getting the same wrong value for the sensor
[May 1 18:24:02.101] Temperature: 21474836.470000 *C
[May 1 18:24:02.101] Humidity: 21474836.470000 %RH
[May 1 18:24:02.101] Pressure: 214748.364700 hPa
In additional RES_FAIL return -100
[May 1 18:24:02.101] Adafruit_BME280.RES_FAIL: -100
Is there some update in the code or some tip I need to setup the sensor first?