code esteban

This commit is contained in:
2026-03-27 13:29:22 +01:00
parent 1f84b5bc09
commit f5ba39da8d
5 changed files with 293 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BOARD)
GPIO.setwarnings(False)
class EtatSysteme:
def __init__(self):
self.pinLedRouge = 35
self.pinLedVerte = 37
GPIO.setup(self.pinLedRouge, GPIO.OUT, initial=GPIO.LOW)
GPIO.setup(self.pinLedVerte, GPIO.OUT, initial=GPIO.LOW)
def signalerOk(self):
GPIO.output(self.pinLedVerte, GPIO.HIGH)
GPIO.output(self.pinLedRouge, GPIO.LOW)
def signalerProbleme(self):
GPIO.output(self.pinLedVerte, GPIO.LOW)
GPIO.output(self.pinLedRouge, GPIO.HIGH)
def cleanup(self):
GPIO.output(self.pinLedRouge, GPIO.LOW)
GPIO.output(self.pinLedVerte, GPIO.LOW)