.
This commit is contained in:
@@ -1,23 +0,0 @@
|
||||
import tm1637
|
||||
import time as t
|
||||
|
||||
# attention : mode BOARD
|
||||
display = tm1637.TM1637(clk=7, dio=11)
|
||||
|
||||
display.brightness(2)
|
||||
|
||||
print("Test affichage...")
|
||||
|
||||
try:
|
||||
while True:
|
||||
display.show("1234")
|
||||
print("1234")
|
||||
t.sleep(2)
|
||||
|
||||
display.show("0000")
|
||||
print("0000")
|
||||
t.sleep(2)
|
||||
|
||||
except KeyboardInterrupt:
|
||||
display.show("----")
|
||||
print("Stop")
|
||||
@@ -1,15 +0,0 @@
|
||||
import Adafruit_DHT as dht
|
||||
import time as t
|
||||
|
||||
capteur = dht.DHT11
|
||||
pin = 22
|
||||
|
||||
while True:
|
||||
humidite, temperature = dht.read_retry(capteur, pin)
|
||||
|
||||
if temperature is not None:
|
||||
print("Temp :", temperature, "°C")
|
||||
else:
|
||||
print("Erreur")
|
||||
|
||||
t.sleep(2)
|
||||
Reference in New Issue
Block a user