Merge branch 'main' of ssh://gitlab.fdmci.hva.nl/propedeuse-hbo-ict/onderwijs/2023-2024/out-a-se-ti/blok-3/qaajeeqiinii59

This commit is contained in:
Sietse Jonker
2024-03-27 14:13:30 +01:00
4 changed files with 73 additions and 1 deletions

View File

@@ -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/NodeClassUml
- 🍓 RPi Documentation:
- Raspberry pi: Sp1SchetsProject/InfrastructuurDocumentatie/raspberryPi
- MariaDB: rpi-documentation/mariadb-installation

View File

@@ -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.

View File

@@ -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()
}
}
```

View File

@@ -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,
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