Initial commit

This commit is contained in:
2024-05-06 23:34:13 -03:00
commit 453275b96f
16 changed files with 2688 additions and 0 deletions

33
src/main.c Normal file
View File

@@ -0,0 +1,33 @@
#include <esp_log.h>
#include "bme280.h"
#include "events.h"
#include "i2c.h"
#include "wifi.h"
#define TAG "main"
void app_main() {
ESP_LOGW(TAG, "helloooooooo");
setupEvents();
// wifiInit("204", "31415926");
// wifiStart();
i2cInitMasterBus(4, 15);
struct BME280 bme;
BME280Init(&bme, OVSP_X1);
for (;;) {
struct BME280Reading reading = BME280Read(&bme);
ESP_LOGW(TAG, "HEY THE TEMPERATURE IS %f °C", reading.tempC);
ESP_LOGW(TAG, "HEY THE HUMIDITY IS %f %%", reading.humidity);
ESP_LOGW(TAG, "HEY THE PRESSURE IS %f hPa\n", reading.pressurehPa);
vTaskDelay(1000 / portTICK_PERIOD_MS);
}
}