not working but shudbe soon
This commit is contained in:
parent
7f5e4581d6
commit
d71cb391c1
2 changed files with 28 additions and 22 deletions
|
@ -1,36 +1,16 @@
|
||||||
#include "apple.h"
|
#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() {
|
int app_main() {
|
||||||
//tiem delay
|
|
||||||
|
|
||||||
//fill struct
|
//fill struct
|
||||||
struct appldata send;
|
struct appledata send;
|
||||||
getmac(send.mac) ;
|
getmac(send.mac) ;
|
||||||
send.upTime = getUpTime();
|
send.upTime = getUpTime();
|
||||||
send.temp = getTemp();
|
send.temp = getTemp();
|
||||||
send.battaryVoltage = 3.3;
|
send.battaryVoltage = 3.3;
|
||||||
|
|
||||||
|
printf("%.4f",send.temp);
|
||||||
|
|
||||||
//end func
|
//end func
|
||||||
return 0;
|
return 0;
|
||||||
|
|
26
embadet/main/apple.h
Normal file
26
embadet/main/apple.h
Normal 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
|
Loading…
Reference in a new issue