From d52eabbb614e795eb3ccc6b6f5e2e3097aed66d2 Mon Sep 17 00:00:00 2001 From: Bram Barbieri Date: Wed, 20 Mar 2024 11:16:31 +0100 Subject: [PATCH 1/4] Bram documentation --- .../documentatie/FirstDocumentation.md | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/docs/LearningProcessBram/documentatie/FirstDocumentation.md b/docs/LearningProcessBram/documentatie/FirstDocumentation.md index a1ecda4..c522fa4 100644 --- a/docs/LearningProcessBram/documentatie/FirstDocumentation.md +++ b/docs/LearningProcessBram/documentatie/FirstDocumentation.md @@ -185,7 +185,7 @@ pinMode(buzzertwo, OUTPUT); void loop() { - //read is there is input on the button pin, if so send output to the other pins., otherwise keep them off. + //read is there is input on the button pin, if so send output to the other pins, otherwise keep them off. if(digitalRead(button) == HIGH){ digitalWrite(buzzerone, HIGH); digitalWrite(buzzertwo, HIGH); @@ -243,11 +243,26 @@ elif c == 2: 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. +After some intense trail and error, I managed to connect to the websocket. After wich i also managed to send infromation to the database by including details like pasword and such. -I began investigating deeper and asked for other people their vision on my code. -It wasa hard to notice what problems there were, but eventualy me and a classmate found out that the problem was inside of the database itself. -So after fixing some issues with the primary keys and some tesing with the code, I managed to fix the issues for the time being. +I began investigating deeper and asked for other people's vision on my code. + +It wasa hard to notice what problems there were, but eventualy me and a classmate found out that the problem was inside of the database itself instead of the code. So after fixing some issues with the primary keys and some tesing with the code, I managed to fix the issues that popped up. + Now the code is able to send websocket data to the database under the name of node "1". This will have to be updated so all names could be sent to the database without causing issues. But the current code does what we expect from sprint two but I will surely continue working on making it perfect. + +### python for dummies pt3 +After the sprint review for sprint two, we as a team decided that i was time to make progress with connecting more nodes, and so i did. + +I began searching for leads on how to grab information from a database, and used this website to teach me: +https://www.w3schools.com/python/python_mysql_select.asp + +Once I figured out how to grab information, I wanted to put it in an array and look if the connected node(wich I put in a varriable) was already known in the array. The webpage for this was: https://stackabuse.com/python-check-if-array-or-list-contains-element-or-value/ + +This originaly didn't work, and by printing all my variables and the array I initially didn't see anything that would prevent it from working. +But for some reason the given node wouldn't compare itself to the nodes in the array. +That is when I found out the data from the array was in a tuple. So when I changed the variable to turn into a tuple, it worked like a charm. + +Then after all of this trouble, I finished by putting the new node MAC (in string format) into the correct collum in the database so this will MAC will be saved in the future. \ No newline at end of file From 38d34cce9184b2090bab281c3db2e1086351aa24 Mon Sep 17 00:00:00 2001 From: Bram Barbieri Date: Wed, 20 Mar 2024 11:30:52 +0100 Subject: [PATCH 2/4] Bram comment --- .../documentatie/FirstDocumentation.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/LearningProcessBram/documentatie/FirstDocumentation.md b/docs/LearningProcessBram/documentatie/FirstDocumentation.md index c522fa4..98ad456 100644 --- a/docs/LearningProcessBram/documentatie/FirstDocumentation.md +++ b/docs/LearningProcessBram/documentatie/FirstDocumentation.md @@ -196,7 +196,7 @@ void loop() { } ``` -Here I made the physical design but instead of buzzers i used lights in order to show it working. +Here I made the physical design but instead of buzzers I used lights in order to show it working. ![board turned off.]() And here is the the board working: ![board working and turned on.]() @@ -244,7 +244,7 @@ Even if it looked simple, this was the ignition I needed to understand python be ### Python for dummmies pt2 After some intense trail and error, I managed to connect to the websocket. -After wich i also managed to send infromation to the database by including details like pasword and such. +After wich I also managed to send infromation to the database by including details like pasword and such. I began investigating deeper and asked for other people's vision on my code. It wasa hard to notice what problems there were, but eventualy me and a classmate found out that the problem was inside of the database itself instead of the code. So after fixing some issues with the primary keys and some tesing with the code, I managed to fix the issues that popped up. @@ -254,7 +254,7 @@ This will have to be updated so all names could be sent to the database without But the current code does what we expect from sprint two but I will surely continue working on making it perfect. ### python for dummies pt3 -After the sprint review for sprint two, we as a team decided that i was time to make progress with connecting more nodes, and so i did. +After the sprint review for sprint two, we as a team decided that it was time to make progress with connecting more nodes, and so I did. I began searching for leads on how to grab information from a database, and used this website to teach me: https://www.w3schools.com/python/python_mysql_select.asp @@ -265,4 +265,4 @@ This originaly didn't work, and by printing all my variables and the array I ini But for some reason the given node wouldn't compare itself to the nodes in the array. That is when I found out the data from the array was in a tuple. So when I changed the variable to turn into a tuple, it worked like a charm. -Then after all of this trouble, I finished by putting the new node MAC (in string format) into the correct collum in the database so this will MAC will be saved in the future. \ No newline at end of file +Then after all of this trouble, I finished by putting the new node MAC (in string format) into the correct collum in the database so this will MAC will be saved in the future. \ No newline at end of file From 5bf19a82ff38d5c44d8fa25fe81841c96bbc32db Mon Sep 17 00:00:00 2001 From: Bram Barbieri Date: Wed, 20 Mar 2024 12:02:22 +0100 Subject: [PATCH 3/4] bram documentation --- docs/LearningProcessBram/documentatie/FirstDocumentation.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/docs/LearningProcessBram/documentatie/FirstDocumentation.md b/docs/LearningProcessBram/documentatie/FirstDocumentation.md index 98ad456..b963112 100644 --- a/docs/LearningProcessBram/documentatie/FirstDocumentation.md +++ b/docs/LearningProcessBram/documentatie/FirstDocumentation.md @@ -1,5 +1,4 @@ ## Bram's Learning Curve - Here I post my progress on learning and mastering Arduino. I originally did the Game development study but decided to switch to "Technische Informatica". That is why I need to learn everything from scratch, and everything is new to me. This is the reason that I made these documents, in order to track my progression in this new study. @@ -72,11 +71,9 @@ examples, basics, fade examples, servo, sweep ### Linux and raspberry PI. - To gain more knowledge about Linux, I first asked my classmates if they could get me started. They showed me how to gain access to a server and told me how to navigate through files. - By doing this I got taught the following commands: ~ $ 'ls -la' = show file / folders From cd56c45c476b87efa6354043e501dfbd675fd4ec Mon Sep 17 00:00:00 2001 From: Dano van den Bosch Date: Wed, 20 Mar 2024 13:18:08 +0100 Subject: [PATCH 4/4] Daily stand up for 20/03 --- teamdocumentatie/dailyStandupNotes.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/teamdocumentatie/dailyStandupNotes.md b/teamdocumentatie/dailyStandupNotes.md index d91b0a7..2bdcb87 100644 --- a/teamdocumentatie/dailyStandupNotes.md +++ b/teamdocumentatie/dailyStandupNotes.md @@ -60,4 +60,10 @@ and im going to continue with working on the connection between the websocket an Dano, oop arduino Bram, nodes registereen als er een nieuwe binnenkomt Sietse, onderdelen bestellen, verder user story 46: nodes beheren op website. -Sam, tft scherm, rest api ombouwen om data in node tabel te douwen \ No newline at end of file +Sam, tft scherm, rest api ombouwen om data in node tabel te douwen + +20/03/2024: + Dano: Adding comments for OOP Arduino + Bram: Python send node data to database + Sam: flask rerouten to use put recuest + Sietse: WireFrame \ No newline at end of file