Sam
2024-03-11 13:52:09 +01:00
3 changed files with 36 additions and 5 deletions

View File

@@ -70,8 +70,6 @@ By doing this i got taught the following commands:
~ $ 'ping ip addres'
~ $ 'ssh username@ip address' = open ssh connection.
From here i went and looked up several linux video's wich taught me the following:
....
### Air, temperature, and all sort of stuff.
After the linux coding i decided to take a step back and began gaining experience with sensors.
@@ -124,9 +122,9 @@ Serial.println(F("°F"));
}
```
And The fysical board looks like this:
![Fysical DHT11 board off](<assets/DHT11 state 1.jpg>)
And here it looks in action:
![fysical DHT11 board on](<assets/DHT11 state 2.jpg>)
Later on i could expand this code and the fysical product to include the rest of the sensors.
### Buzzers .pt 2
@@ -159,4 +157,37 @@ void loop() {
}
```
and the fysical design looks like this: ...
### Python For Dummies.
My job was to make a connection between the websocket and the database we had set up, and to do this we wanted to use python.
I had never used python before and was totaly new to the entire code structure and wording.
Because I was totaly new to all of python, I asked chatGPT for and example and some concrete code.
I asked it my question wich was the assignment I was given and tried to reverse learn this way.
I went and looked up fitting tutorials on W3SChools.
The following were used:
(https://www.w3schools.com/python/python_mysql_getstarted.asp)
(https://websockets.readthedocs.io/en/stable/)
(https://www.w3schools.com/python/python_mysql_insert.asp)
(https://www.w3schools.com/python/python_json.asp)
after still not getting it verry well i asked Dano ( a teammate of mine ) if he could learn me soem 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:
print("1 = + 2 = -")
c = int(input())
print("first number")
a = input()
print("second number")
b= input()
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.

Binary file not shown.

After

Width:  |  Height:  |  Size: 572 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 596 KiB