-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
65 lines (51 loc) · 1013 Bytes
/
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
64
65
#!/usr/bin/env python
#coding: utf-8-
#importation des modules
import sys
path = "./"
sys.path.append(path)
import time
import RPi.GPIO as GPIO
from tkinter import *
#import server.py
import miam
import pH
import oxygen
import temp
import server
import config
import quali
#paramètrage des broches
GPIO.setmode(GPIO.BCM)
GPIO.setup(4,GPIO.IN) #capteur de position distributeur
GPIO.setup(18,GPIO.OUT) #commande distributeur
GPIO.setup(19,GPIO.OUT)
#variables
evening = 18
morning = 8
#appel aux modules
while True:
#configuration
#nourriture
heure = config.get(foodtime)
print (heure)
print("Entrez dtime")
dtime = int(input())
if dtime is heure:
miam.distrib(1)
time.sleep(0.2)
#oxigen
#pH
#server
#cam
#lum
dtime = date(hour)
if dtime is morning:
GPIO.output(19,HIGH)
elif dtime = evening:
GPIO.output(19,LOW)
#temp
#test des GPIO
#fin du programme
GPIO.cleanup()
exit()