Skip to content
Snippets Groups Projects
Commit 166f6288 authored by Adrien Chabod's avatar Adrien Chabod
Browse files

ajout machine

parent 378e3ccd
Branches main
No related tags found
1 merge request!1MAJ BDD + Data commande fonctionnel
from multiprocessing.connection import wait
import RPi.GPIO as GPIO
from time import sleep # this lets us have a time delay (see line 12)
import sys
increment = 0
stop = 0
gpioPompe1 = 0
gpioPompe2 = 3
gpioPompe3 = 4
gpioElectrovanne1 = 1
gpioElectrovanne2 = 2
gpioElectrovanne3 = 5
gpioElectrovanne4 = 6
gpioElectrovanne5 = 7
gpioElectrovanne6 = 8
gpioDebitmetre1 = 1
gpioDebitmetre2 = 2
gpioDebitmetre3 = 3
pompe1 = GPIO.PWM(gpioPompe1,100)
pompe2 = GPIO.PWM(gpioPompe2,100)
pompe3 = GPIO.PWM(gpioPompe3,100)
def gpioSetup():
GPIO.setmode(GPIO.BCM)
#GPIO POMPES
GPIO.setup(gpioPompe1, GPIO.OUT, initial=GPIO.LOW)
GPIO.setup(gpioPompe2, GPIO.OUT, initial=GPIO.LOW)
GPIO.setup(gpioPompe3, GPIO.OUT, initial=GPIO.LOW)
#GPIO EV
GPIO.setup(gpioElectrovanne1, GPIO.OUT, initial=GPIO.LOW)
GPIO.setup(gpioElectrovanne2, GPIO.OUT, initial=GPIO.LOW)
GPIO.setup(gpioElectrovanne3, GPIO.OUT, initial=GPIO.LOW)
GPIO.setup(gpioElectrovanne4, GPIO.OUT, initial=GPIO.LOW)
GPIO.setup(gpioElectrovanne5, GPIO.OUT, initial=GPIO.LOW)
GPIO.setup(gpioElectrovanne6, GPIO.OUT, initial=GPIO.LOW)
#GPIO DEBIMETRE
GPIO.setup(gpioDebitmetre1, GPIO.IN)
GPIO.setup(gpioDebitmetre2, GPIO.IN)
GPIO.setup(gpioDebitmetre3, GPIO.IN)
def
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment