/* Blink Example This example code is in the Public Domain (or CC0 licensed, at your option.) Unless required by applicable law or agreed to in writing, this software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ #include #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "driver/gpio.h" #include "esp_log.h" #include "sdkconfig.h" #include "esp_mac.h" #include #include "components/sensors.h" #include "components/util.h" #include "hw/bme680b.h" #include "hw/ccs811.h" #include "hw/i2cbrn.h" #include "hw/ina260.h" #include "hw/mcp23018.h" #include "hw/mpu9250.h" #define TAG "cantest" #define CONFIG_FREERTOS_HZ 100 void app_main(void) { /* instantiate i2c master bus 0 */ ESP_ERROR_CHECK(i2c_new_master_bus(&i2c0_bus_cfg, &i2c0_bus_hdl)); /* scan i2c devices on i2c master bus 0 and print results */ ESP_ERROR_CHECK(i2c_master_bus_detect_devices(i2c0_bus_hdl)); /* create task pinned to the app core */ xTaskCreatePinnedToCore( i2c_sensors_task, "I2CTaskBME", 8192, NULL, (tskIDLE_PRIORITY + 2), NULL, APP_CPU_NUM); while (1) { vTaskDelay(100 / portTICK_PERIOD_MS); } }