diff --git a/docs/node-documentation/nodeClass.md b/docs/node-documentation/nodeClass.md new file mode 100644 index 0000000..fb9b4ed --- /dev/null +++ b/docs/node-documentation/nodeClass.md @@ -0,0 +1,59 @@ +# OOP within Arduino + +### Why use classes + +## Whitch classes did we use + +### Uml diagram + +--- +title: Arduino classes +--- +classDiagram + class Websockets + Websockets: + + +Class Websockets: + Public: + websockets(); + void hexdump(const void *mem, uint32_t len, uint8_t cols = 16); + void websocketSetup(); + void loop(); + void webSocketEvent(WStype_t type, uint8_t * payload, size_t length); + void sendMyText(String message); + + private: + WebSocketsClient *webSocket; + WiFiMulti *_WiFiMulti; + +Class NodeReadings: +public: + nodeReadings(); + void setup(); + void loop(); + void resetValues(); + void update(); + void checkForError(); + void displayData(); + +private: + DHT *dht; + Adafruit_SH1106G *display; + websockets *webSocket; + Adafruit_SGP30 *sgp; + + uint16_t TVOC_base, eCO2_base; + uint16_t counter; + uint16_t eCO2; + uint16_t TVOC; + uint16_t interval; + float temperature; + float humidity; + unsigned long currentMillis; + unsigned long lastMillis; + bool errorSGP30; + bool errorDHT11; + bool noise; + +### Small explenation \ No newline at end of file