2020-07-30 09:22:33 +02:00
|
|
|
#include "Arduino.h"
|
|
|
|
|
|
|
|
#include <WiFi.h>
|
|
|
|
#include <HTTPClient.h>
|
|
|
|
#include <WiFiClientSecure.h>
|
|
|
|
|
|
|
|
// To get timeZone from main file
|
|
|
|
extern int timeZone;
|
|
|
|
|
|
|
|
// Wifi ssid and password
|
|
|
|
extern char *ssid;
|
|
|
|
extern char *pass;
|
|
|
|
|
|
|
|
#ifndef NETWORK_H
|
|
|
|
#define NETWORK_H
|
|
|
|
|
|
|
|
// All functions defined in Network.cpp
|
|
|
|
|
|
|
|
class Network
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
// Functions we can access in main file
|
|
|
|
void begin();
|
|
|
|
void getTime(char *timeStr);
|
2020-07-30 13:52:43 +02:00
|
|
|
bool getData(double *data);
|
2020-07-30 09:22:33 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
// Functions called from within our class
|
|
|
|
void setTime();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|