-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
executable file
·63 lines (53 loc) · 1.7 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/usr/bin/env python3
#copy all code files from host to client:
#scp -r "/Users/philippmielke/Documents/Hochschule/Modulunterlagen/6. Semester/ES/Embedded Systems 1/UE/Labor 4/Quellcode/"* uniprojekt:/home/phil/Uniprojekte/Lab4/
import sys, time
from src.camera import *
from src.pir import *
def main():
"""
1. Initialisierung des PIR Sensors
2. Initialisierung der Objektliste
"""
pinNumberPIR : int = 4
init_pir(pinNumberPIR)
init_objList()
"""
3. Initialisierung der Objekte mit den jeweiligen
Kameraeinstellungen
- mögliche Einstellungen:
name : str
path : str
width : int
hight : int
rotation : int
effect : str
- Camerasettings.print_effects() gibt alle möglichen Effekte aus
"""
name : str = "telegram"
path : str = "/home/phil/Uniprojekte/Lab4/Applications"
telegram: Camerasettings = Camerasettings(name, path)
set_objListValue(telegram)
name : str = "browser"
path : str = "/home/phil/Uniprojekte/Lab4/Applications"
width : int = 640
hight : int = 480
browser : Camerasettings = Camerasettings(name, path, width, hight)
set_objListValue(browser)
list = get_objList()
for obj in list:
print()
print(obj)
telegram.get_picture(0.75)
browser.start_stream()
while True:
try:
timeInSeconds = 60
#enable_motionDetector(timeInSeconds)
time.sleep(timeInSeconds)
except KeyboardInterrupt:
print("Auf Wiedersehen...")
exit_pir()
sys.exit()
if __name__ == "__main__":
main()