mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2025-10-22 11:42:35 +00:00
esp32 temperature node
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
#include "i2c_bus.h"
|
||||
#include "bme280.h"
|
||||
|
||||
static const char *TAG = "i2c-simple-example";
|
||||
static const char *TAG = "esp32 node";
|
||||
float temperature = 0.0f, humidity = 0.0f, pressure = 0.0f;
|
||||
|
||||
int i2c_master_port = 0;
|
||||
@@ -50,9 +50,6 @@ void app_main(void)
|
||||
bme280_read_temperature(bme280, &temperature);
|
||||
bme280_read_humidity(bme280, &humidity);
|
||||
bme280_read_pressure(bme280, &pressure);
|
||||
//printf("Temperature: %.1f C\n", temperature);
|
||||
//printf("Humidity: %.2f %%\n", humidity);
|
||||
//printf("Pressure: %.2f kPa\n", pressure);
|
||||
printf(" %.1f, %.2f, %.2f \n", temperature, humidity, pressure);
|
||||
|
||||
vTaskDelay(2000/portTICK_PERIOD_MS);
|
||||
|
Reference in New Issue
Block a user