2024-03-13 14:45:33 +01:00
5 changed files with 35 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
// Sietse Jonker & Dano Bosch
// Sietse Jonker & Dano van den Bosch
// 28/02/2024
// include these libraries
@@ -69,7 +69,7 @@ void webSocketEvent(WStype_t type, uint8_t * payload, size_t length) {
USE_SERIAL.printf("[WSc] Connected to url: %s\n", payload);
// send message to server when Connected
webSocket.sendTXT("Connected");
webSocket.sendTXT("{\"message\": \"Connected\"}");
break;
case WStype_TEXT:
// USE_SERIAL.printf("[WSc] get text: %s\n", payload);

View File

@@ -0,0 +1,13 @@
#ifndef nodeClass_h
#define nodeClass_h
#include "Arduino.h"
class nodeReadings {
private:
public:
nodeReadings();
void readDht();
void printNode();
// class code goes here
};
#endif

View File

@@ -219,17 +219,28 @@ The following were used:
After still not getting it very well i asked Dano (a teammate of mine) if he could teach me some basics, and so we did.
He taught me how to make a simple calculator and told me why my code worked the way it did.
(This was the code:
(This was the code:
// this prints a cheatsheet to know if the user wants plus or minus.
print("1 = + 2 = -")
c = int(input())
// a input is given for the first number.
print("first number")
a = input()
//a input is given for the second number.
print("second number")
b= input()
//a if-statement to see if it is plus or minus.
if c == 1:
print(int(a) + int(b))
elif c == 2:
print(int(a) - int(b))
)
Even if it looked simple, this was the ignition I needed to understand python better and continue my own research.
Even if it looked simple, this was the ignition I needed to understand python better and continue my own research.
### Python for dummmies pt2
after some intense trail and error, I managed to connect to the websocket.

Binary file not shown.

View File

@@ -35,4 +35,11 @@ and im going to continue with working on the connection between the websocket an
Sietse is going to make a class in python.
Dano is making classes for the code of the node.
Bram is correcting some of his documentation and will continue the coding in python( to still make the connection between the database and the websocket.)
}
13 - 3 - 2024 {
Dano: website scaling + css fixing and arduino OOP.
Sam: making a rest api to pull stuff from database.
Sietse: OOP python.
Bram: Finaly finishing connection between database and websocket.
}