feat(iot): connection wifi and API *UNTESTED*

This commit is contained in:
2023-03-28 17:28:55 +02:00
parent 98e0342fe1
commit c57225c1f3
2 changed files with 53 additions and 0 deletions

View File

@ -2,6 +2,7 @@
#define API_H
#include <Arduino_JSON.h>
#include <WiFiEsp.h>
class API {
public:
@ -10,6 +11,8 @@ public:
API(String user, String password, String host, bool https = true);
bool wifiBegin(String wifiId, String wifiPass, Stream* espSerial);
bool sendValute(String val, String poubelleID);
JSONVar* connect();
@ -20,7 +23,12 @@ private:
String password;
String serveurHost;
bool https;
WiFiEspClient* client;
String token;
};