not working but shudbe soon

This commit is contained in:
user 2024-10-13 23:51:32 +02:00
parent 7f5e4581d6
commit d71cb391c1
2 changed files with 28 additions and 22 deletions

View file

@ -1,36 +1,16 @@
#include "apple.h"
#include "esp_log.h"
#include <stdio.h>
#include <time.h>
#include <onewire.h>
#include <ds18b20.h> // Die Header-Datei mit DS18B20-Funktionen
#include <task.h>
#include <esp_wifi.h>
#include <FreeRTOSConfig.h>
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;

26
embadet/main/apple.h Normal file
View file

@ -0,0 +1,26 @@
#ifndef APPLE_H
#define APPLE_H
#include <esp_log.h>
#include <stdio.h>
#include <time.h>
#include <onewire.h>
#include <ds18b20.h> // Die Header-Datei mit DS18B20-Funktionen
#include <task.h>
#include <esp_wifi.h>
#include <FreeRTOSConfig.h>
struct appledata{
uint8_t mac[6];
float temp;
float battaryVoltage;
int upTime;
};
float getTemp();
int getUpTime();
void getmac(uint8_t *buf);
#endif