diff --git a/composants/byPanda/DHT11.py b/composants/byPanda/DHT11.py index 367553b..25d5bca 100644 --- a/composants/byPanda/DHT11.py +++ b/composants/byPanda/DHT11.py @@ -4,7 +4,7 @@ import RPi.GPIO as GPIO GPIO.setmode(GPIO.BOARD) capteur = dht.DHT11 -pin = 22 +pin = 25 def lire_temperature(): humidite, temperature = dht.read_retry(capteur, pin) @@ -14,4 +14,6 @@ def lire_temperature(): else: print("Erreur") - t.sleep(2) \ No newline at end of file + t.sleep(2) + +lire_temperature() diff --git a/composants/byPanda/septsegments.py b/composants/byPanda/septsegments.py index ba39ac7..21da0c4 100644 --- a/composants/byPanda/septsegments.py +++ b/composants/byPanda/septsegments.py @@ -1,7 +1,7 @@ import tm1637 import time as t - +# Le TM1637 utilise le mode BCM en arrière-plan display = tm1637.TM1637(clk=4, dio=17) display.brightness(2) diff --git a/composants/byPanda/thermostat.py b/composants/byPanda/thermostat.py index 3cd3a3f..a80f5a0 100644 --- a/composants/byPanda/thermostat.py +++ b/composants/byPanda/thermostat.py @@ -2,7 +2,7 @@ import time import RPi.GPIO as GPIO import Adafruit_DHT -GPIO.setmode(GPIO.BOARD) +GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False)