From d71cb391c1f7d3effff7fda51a1711baf2fce717 Mon Sep 17 00:00:00 2001 From: user Date: Sun, 13 Oct 2024 23:51:32 +0200 Subject: [PATCH] not working but shudbe soon --- embadet/main/apple.c | 24 ++---------------------- embadet/main/apple.h | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 22 deletions(-) create mode 100644 embadet/main/apple.h diff --git a/embadet/main/apple.c b/embadet/main/apple.c index 6d50c46..421a618 100644 --- a/embadet/main/apple.c +++ b/embadet/main/apple.c @@ -1,36 +1,16 @@ #include "apple.h" -#include "esp_log.h" -#include -#include -#include -#include // Die Header-Datei mit DS18B20-Funktionen -#include -#include -#include - -float getTemp(); -int getUpTime(); -void getmac(); - -struct appldata{ - uint8_t mac[6]; - float temp; - float battaryVoltage; - int upTime; -}; - int app_main() { - //tiem delay //fill struct - struct appldata send; + struct appledata send; getmac(send.mac) ; send.upTime = getUpTime(); send.temp = getTemp(); send.battaryVoltage = 3.3; + printf("%.4f",send.temp); //end func return 0; diff --git a/embadet/main/apple.h b/embadet/main/apple.h new file mode 100644 index 0000000..47fd72b --- /dev/null +++ b/embadet/main/apple.h @@ -0,0 +1,26 @@ +#ifndef APPLE_H +#define APPLE_H + +#include +#include +#include +#include +#include // Die Header-Datei mit DS18B20-Funktionen +#include +#include +#include + + +struct appledata{ + uint8_t mac[6]; + float temp; + float battaryVoltage; + int upTime; +}; + +float getTemp(); +int getUpTime(); +void getmac(uint8_t *buf); + + +#endif \ No newline at end of file