From 6fd674f4c94ec33c09639035db238ec53fcedc91 Mon Sep 17 00:00:00 2001 From: Dano van den Bosch Date: Wed, 27 Mar 2024 12:16:58 +0100 Subject: [PATCH 1/5] daily stand op 27 maart --- teamdocumentatie/dailyStandupNotes.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/teamdocumentatie/dailyStandupNotes.md b/teamdocumentatie/dailyStandupNotes.md index 64153e3..f5a63bb 100644 --- a/teamdocumentatie/dailyStandupNotes.md +++ b/teamdocumentatie/dailyStandupNotes.md @@ -87,4 +87,11 @@ Sam, tft scherm, rest api ombouwen om data in node tabel te douwen Sam: gebouw beheer vragen, Wall mounted enquete doos Sietse: rest api encete vragen Bram: expert voorbereigen, node data updaten - Dano: Documentatie schreiven, \ No newline at end of file + Dano: Documentatie schreiven, + +27/03/2024 + + Bram: OOP python + Sam: new website + Sietse: enquete screen data sending to database and database cript better + Dano: documentation about oop arduino \ No newline at end of file From 98e47d39fc82753b0fee42349286ea764227f801 Mon Sep 17 00:00:00 2001 From: Dano van den Bosch Date: Wed, 27 Mar 2024 12:18:08 +0100 Subject: [PATCH 2/5] Uml node class --- docs/node-documentation/NodeClassUml.md | 43 +++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 docs/node-documentation/NodeClassUml.md diff --git a/docs/node-documentation/NodeClassUml.md b/docs/node-documentation/NodeClassUml.md new file mode 100644 index 0000000..2259384 --- /dev/null +++ b/docs/node-documentation/NodeClassUml.md @@ -0,0 +1,43 @@ +### Uml diagram: + +``` mermaid +classDiagram + +namespace Esp { + class Websockets{ + +webSocket + +_WiFiMulti + hexdump() + websocketSetup() + loop() + webSocketEvent() + sendMyText() + } + + class NodeReadings{ + + +TVOC_base, eCO2_base + +counter + +eCO2 + +TVOC + +interval + +temperature + +humidity + +currentMillis + +lastMillis + +errorSGP30 + +errorDHT11 + +noise + + setup() + loop() + resetValues() + update() + checkForError() + displayData() + + } + + +} +``` From 6d548f7738e7ac3ab97e2891ccf0e9e063151910 Mon Sep 17 00:00:00 2001 From: Dano van den Bosch Date: Wed, 27 Mar 2024 12:19:28 +0100 Subject: [PATCH 3/5] node class OOP --- .../NodeClassDocumentation.md | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 docs/node-documentation/NodeClassDocumentation.md diff --git a/docs/node-documentation/NodeClassDocumentation.md b/docs/node-documentation/NodeClassDocumentation.md new file mode 100644 index 0000000..d0bc370 --- /dev/null +++ b/docs/node-documentation/NodeClassDocumentation.md @@ -0,0 +1,20 @@ +# OOP within Arduino + +Object-Oriented Programming (OOP) is a way of programing that provides a means of structuring your code so the code is modular and can be used more often without making huge changes or having to copy past the same code. + +## Abstraction + +Abstraction in OOP is the process of exposing only the required essential variables and functions. This means hiding the complexity and only showing the essential features of the object. In Arduino, this could mean creating a class like `Sensor node` with methods such as `setUp()`, `displayData()`, and `checkForError()`. + +## Encapsulation + +Encapsulation is the technique used to hide the data and methods within an object and prevent outside access. In Arduino, this could mean having private variables and methods in a class that can only be accessed and modified through public methods. + +## Which classes did we use + +In this Arduino project, we used several classes to organize our code and manage the complexity of the project. Some of these classes include: + +- `websockets`: This class is responsible for managing the WebSocket connections. +- `nodeReadings`: This class is responsible for managing the sensor readings. + +Each of these classes encapsulates the data and methods related to a specific part of the project, making the code easier to understand and maintain. \ No newline at end of file From b914be9534f7e51585e1453dad1fb52ab3559b91 Mon Sep 17 00:00:00 2001 From: Dano van den Bosch Date: Wed, 27 Mar 2024 12:20:36 +0100 Subject: [PATCH 4/5] Pages updates --- docs/.pages | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/.pages b/docs/.pages index effa9ce..ceb3c9b 100644 --- a/docs/.pages +++ b/docs/.pages @@ -11,6 +11,8 @@ nav: - TFT screen : node-documentation/TFT-screen - Classes : arduino-documentation/classes - Node Documentation: node-documentation/node + - Node Class: node-documentation/NodeClassDocumentation + - Node Uml Diagram: node-documentation/NodeUmlDiagram - 🍓 RPi Documentation: - Raspberry pi: Sp1SchetsProject/InfrastructuurDocumentatie/raspberryPi - MariaDB: rpi-documentation/mariadb-installation From b38730e9a14cfd9bc7dffd18251853b5c71609d9 Mon Sep 17 00:00:00 2001 From: Dano van den Bosch Date: Wed, 27 Mar 2024 12:22:35 +0100 Subject: [PATCH 5/5] typo in pages --- docs/.pages | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/.pages b/docs/.pages index ceb3c9b..346a632 100644 --- a/docs/.pages +++ b/docs/.pages @@ -12,7 +12,7 @@ nav: - Classes : arduino-documentation/classes - Node Documentation: node-documentation/node - Node Class: node-documentation/NodeClassDocumentation - - Node Uml Diagram: node-documentation/NodeUmlDiagram + - Node Uml Diagram: node-documentation/NodeClassUml - 🍓 RPi Documentation: - Raspberry pi: Sp1SchetsProject/InfrastructuurDocumentatie/raspberryPi - MariaDB: rpi-documentation/mariadb-installation