OOP made in arduino 👍

This commit is contained in:
Dano van den Bosch
2024-03-19 22:28:16 +01:00
parent a4b8ae0dca
commit cf18d4ab4f
6 changed files with 149 additions and 89 deletions

View File

@@ -1,12 +1,16 @@
#ifndef websockerts_h
#define websockerts_h
#ifndef websockets_h
#define websockets_h
#include <WiFiMulti.h>
#include <WiFi.h>
#include <WebSocketsClient.h>
#include "Arduino.h"
#include <Arduino.h>
#define USE_SERIAL Serial
// WiFiMulti WiFiMulti;
// WebSocketsClient webSocket;
// WiFiMulti WiFiMulti;
class websockets {
public:
@@ -17,6 +21,8 @@ class websockets {
void webSocketEvent(WStype_t type, uint8_t * payload, size_t length);
private:
WebSocketsClient *webSocket;
WiFiMulti *_WiFiMulti;
};
#endif