ESP32Tutorials / BME280_ESP_IDF

1 stars 1 forks source link

BME280 initialization issues #2

Open jorgie0 opened 5 months ago

jorgie0 commented 5 months ago

Program executes and returns the following output: I (244) cpu_start: ELF file SHA256: af1af3f2aebc6406... I (250) cpu_start: ESP-IDF: v5.1.2-dirty I (255) cpu_start: Min chip rev: v0.0 I (260) cpu_start: Max chip rev: v3.99 I (265) cpu_start: Chip rev: v1.0 I (270) heap_init: Initializing. RAM available for dynamic allocation: I (277) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM I (283) heap_init: At 3FFB2A10 len 0002D5F0 (181 KiB): DRAM I (289) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM I (295) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM I (302) heap_init: At 4008D590 len 00012A70 (74 KiB): IRAM I (309) spi_flash: detected chip: gd I (312) spi_flash: flash io: dio W (316) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header. I (330) app_start: Starting scheduler on CPU0 I (334) app_start: Starting scheduler on CPU1 I (334) main_task: Started on CPU0 I (344) main_task: Calling app_main() E (354) BME280: init or setting error. code: -1 I (354) main_task: Returned from app_main()

jorgie0 commented 5 months ago

Turns out that the issue is the Chip ID in bme280.h is #define BME280_CHIP_ID (0x60) needs to be changed to #define BME280_CHIP_ID (0x58) if you are using a BMP280z