diff --git a/embadet/main/apple.c b/embadet/main/apple.c index 38c86dc..a113bcd 100644 --- a/embadet/main/apple.c +++ b/embadet/main/apple.c @@ -6,6 +6,7 @@ #include // Die Header-Datei mit DS18B20-Funktionen #include #include +#include struct appldata; /* @@ -21,6 +22,8 @@ int app_main() { // Variable to store the MAC address uint8_t baseMac[6]; + + long uptime = (xTaskGetTickCount() * (1000/configTICK_RATE_HZ)); // Get MAC address of the WiFi station interface esp_read_mac(baseMac, ESP_MAC_WIFI_STA); @@ -30,6 +33,8 @@ int app_main() { } printf("%02X\n", baseMac[5]); + printf( "Uptime = %d\n", (xTaskGetTickCount() * (1000/configTICK_RATE_HZ))); + @@ -50,7 +55,8 @@ int app_main() { temp = ds18b20_read_temp(&sensor); vTaskDelay(5000 / portTICK_PERIOD_MS); printf("\n"); - printf( "Temperature = %.4f", temp); + printf( "Temperature = %.4f\n", temp); + printf( "Uptime = %d", (xTaskGetTickCount() * (1000/configTICK_RATE_HZ))); }; // Print temperature with 4 decimal places