humidity and pressure
This commit is contained in:
@@ -41,9 +41,11 @@ void sensor_task(void *pvParameters) {
|
||||
ygg_bmp280_read_sensor(&dev_bmp_280);
|
||||
// Najpierw OLED, potem (blokujący) HTTP — żeby ekran
|
||||
// odświeżył się nawet gdy serwer nie odpowiada.
|
||||
char buf[32];
|
||||
snprintf(buf, sizeof(buf), "Temp: %.2f C",
|
||||
CURR_READOUT.temperature);
|
||||
char buf[256];
|
||||
snprintf(buf, sizeof(buf), "Temp: %.2f C\nHumid: %.2f %%\nPress: %.2f hPa",
|
||||
CURR_READOUT.temperature,
|
||||
CURR_READOUT.humidity,
|
||||
CURR_READOUT.pressure / 100.);
|
||||
ygg_set_display_label(sh_display, label, buf);
|
||||
ygg_send_sensor_readouts(BASE_URL,
|
||||
SENSOR_NAME,
|
||||
|
||||
@@ -21,6 +21,7 @@ char* ygg_send_get(const char *url) {
|
||||
|
||||
esp_http_client_config_t config = {
|
||||
.url = url,
|
||||
.timeout_ms = 3000,
|
||||
};
|
||||
esp_http_client_handle_t client = esp_http_client_init(&config);
|
||||
esp_err_t err = esp_http_client_open(client, 0);
|
||||
@@ -61,6 +62,7 @@ char* ygg_send_post(const char *url, char *post_data) {
|
||||
|
||||
esp_http_client_config_t config = {
|
||||
.url = url,
|
||||
.timeout_ms = 3000,
|
||||
};
|
||||
|
||||
esp_http_client_handle_t client = esp_http_client_init(&config);
|
||||
|
||||
Reference in New Issue
Block a user