Plateforme Agir Low-Tech

Commit 840a4dc6 authored by davidmercereau's avatar davidmercereau
Browse files

Premier tests

parent 340c69ed
[general]
csv_dir="releves"
# Temps entre 2 mesures (en minute)
delai=1
delai=5
# Nombre de messure
nb_mesure=30
nb_mesure=500
# Note : la durée du test est donc = delai * nb_mesure
##################################################################
......@@ -25,23 +25,78 @@ nb_mesure=30
[t0]
type=ds18b20
id=01193cf068a7
nice_name="tparoi"
nice_name="tparoi (fake)"
[t1]
type=ds18b20
id=0120333b6934
id=3c01d607b846
[t2]
type=ds18b20
id=01203335716a
id=3c01d607ca84
[t3]
type=max31855
gpio=5
nice_name="Vitre"
[t4]
type=ds18b20
id=3c01d607c701
[t5]
type=ds18b20
id=3c01d607019f
[t6]
type=ds18b20
id=01193cd8c2d5
[t7]
type=ds18b20
id=01193cd9cc3b
[t8]
type=ds18b20
id=01193cf068a7
[t9]
type=ds18b20
id=01193cda8884
[t10]
type=ds18b20
id=0120333b6934
[t11]
type=ds18b20
id=01193cda1e33
[t12]
type=ds18b20
id=01193cba6a7c
[t13]
type=ds18b20
id=01193cdb523f
[t14]
type=ds18b20
id=01193cee9bfc
[t4]
[t15]
type=ds18b20
id=01193c3f390e
[t16]
type=ds18b20
id=01193c3ec432
[t17]
type=ds18b20
id=01193c489ae5
[t18]
type=ds18b20
id=01202724fc47
[t19]
type=ds18b20
id=01193c49c0d2
[t20]
type=ds18b20
id=01193c3c4aaf
[t21]
type=max31855
gpio=6
nice_name="Plancha"
[t22]
type=max31855
gpio=13
nice_name="Foyer"
[t23]
type=max31855
# GPIO/BCM pin : https://pinout.xyz/pinout/
# 0 à 27
gpio=16
nice_name="Evac"
......@@ -13,16 +13,24 @@ import adafruit_max31855
# indique N° GPIO : GPIO/BCM pin : https://pinout.xyz/
spi = busio.SPI(board.SCK, MOSI=board.MOSI, MISO=board.MISO)
#cs = digitalio.DigitalInOut(board.D5)
#cs = digitalio.DigitalInOut(board.D6)
#cs = digitalio.DigitalInOut(board.D13)
cs1 = digitalio.DigitalInOut(board.D5)
cs2 = digitalio.DigitalInOut(board.D6)
cs3 = digitalio.DigitalInOut(board.D13)
#cs = digitalio.DigitalInOut(board.D26) # OUT
cs = digitalio.DigitalInOut(board.D16)
cs4 = digitalio.DigitalInOut(board.D16)
max31855 = adafruit_max31855.MAX31855(spi, cs)
while True:
tempC = max31855.temperature
tempF = tempC * 9 / 5 + 32
print("Temperature: {} C {} F ".format(tempC, tempF))
max31855_1 = adafruit_max31855.MAX31855(spi, cs1)
max31855_2 = adafruit_max31855.MAX31855(spi, cs2)
max31855_3 = adafruit_max31855.MAX31855(spi, cs3)
max31855_4 = adafruit_max31855.MAX31855(spi, cs4)
tempC = max31855_1.temperature
print("Temperature1: {} C ".format(tempC))
tempC = max31855_2.temperature
print("Temperature2: {} C ".format(tempC))
tempC = max31855_3.temperature
print("Temperature3: {} C ".format(tempC))
tempC = max31855_4.temperature
print("Temperature4: {} C ".format(tempC))
time.sleep(2.0)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment