Système chronomètre

Tu as bien ajouté tempmem2 == 0 dans la partie du programme.

Par contre pour les conditions faut ajouter à la suite, pas remplacer. Ajoutes les 3 conditions sous les 2 conditions existantes. Ajoutes une condition puis tu testes, si pas ya d’erreur, tu ajoutes une autre, comme ça on ciblera mieux les erreurs.

Oui il y a peut-être des fautes de syntaxe, sauf pour le test 2 qui me parrait plus fonctionnel aussi. J’ai modifié mon message précédent.

Effectivement j’ai bien ajouté tempmem2 = 0 et non pas tempmem2 == 0 car en rentrant tempmem2 == 0, lors du lancement l’erreur me dit que tempmem2 n’est pas définie alors que si je rentre tempmem2 = 0, aucun soucis lors du lancement.

De plus, après avoir rajouté partie par partie, le résultat est toujours identique, le chronomètre se lance mais continue de décompter le temps lorsque T < 25°C.

Je commence a être inquiet sur la réussite de mon projet qui doit se finir à 17h …

Je remet a disposition le programme actuel pour les éventuels personnes qui seraient interessé par le projet qui pourrait apporter une aide a Miguel et à moi même :

# before import the max6675, you must save the max6675.py file at "/usr/lib/python2.7/dist-packages"

# wiring
# Raspberry         MAX6675
#       GND   ------   GND
#        5V     ------   VCC
#   pin 18     ------   SCK
#   pin 22     ------   CS
#   pin 16     ------   SO

import random, sys, time, pygame, datetime, max6675
from pygame.locals import *

# set the pin for communicate with MAX6675
cs = 22
sck = 18
so = 16

# max6675.set_pin(CS, SCK, SO, unit)   [unit : 0 - raw, 1 - Celsius, 2 - Fahrenheit]
max6675.set_pin(cs, sck, so, 1)


FPS = 30
WINDOWWIDTH = 1280
WINDOWHEIGHT = 960
FLASHSPEED = 500 # in milliseconds
FLASHDELAY = 200 # in milliseconds
BUTTONSIZE = 200
BUTTONGAPSIZE = 20
TIMEOUT = 4 # seconds before game over if no button is pushed.

#                R    G    B
WHITE        = (255, 255, 255)
BLACK        = (  0,   0,   0)
BRIGHTRED    = (255,   0,   0)
RED          = (155,   0,   0)
BRIGHTGREEN  = (  0, 255,   0)
GREEN        = (  0, 155,   0)
BRIGHTBLUE   = (  0,   0, 255)
BLUE         = (  0,   0, 155)
BRIGHTYELLOW = (255, 255,   0)
YELLOW       = (155, 155,   0)
DARKGRAY     = ( 40,  40,  40)
bgColor = BLACK


XMARGIN = int((WINDOWWIDTH - (2 * BUTTONSIZE) - BUTTONGAPSIZE) / 2)
YMARGIN = int((WINDOWHEIGHT - (2 * BUTTONSIZE) - BUTTONGAPSIZE) / 2)

# Rect objects for each of the four buttons
YELLOWRECT = pygame.Rect(XMARGIN, YMARGIN, BUTTONSIZE, BUTTONSIZE)
BLUERECT   = pygame.Rect(XMARGIN + BUTTONSIZE + BUTTONGAPSIZE, YMARGIN, BUTTONSIZE, BUTTONSIZE)
REDRECT    = pygame.Rect(XMARGIN, YMARGIN + BUTTONSIZE + BUTTONGAPSIZE, BUTTONSIZE, BUTTONSIZE)
GREENRECT  = pygame.Rect(XMARGIN + BUTTONSIZE + BUTTONGAPSIZE, YMARGIN + BUTTONSIZE + BUTTONGAPSIZE, BUTTONSIZE, BUTTONSIZE)
score = 0

def main():
    global FPSCLOCK, DISPLAYSURF, BASICFONT, BEEP1, BEEP2, BEEP3, BEEP4

def terminate():
    pygame.quit()
    sys.exit()

def checkForQuit():
    for event in pygame.event.get(QUIT): # get all the QUIT events
        terminate() # terminate if any QUIT events are present
    for event in pygame.event.get(KEYUP): # get all the KEYUP events
        if event.key == K_ESCAPE:
            terminate() # terminate if the KEYUP event was for the Esc key
        #pygame.event.post(event) # put the other KEYUP event objects back


pygame.init()
FPSCLOCK = pygame.time.Clock()
DISPLAYSURF = pygame.display.set_mode((WINDOWWIDTH, WINDOWHEIGHT))
pygame.display.set_caption('Contrôle du four!')
BASICFONT = pygame.font.Font('freesansbold.ttf', 16)
BASICFONT2 = pygame.font.Font('freesansbold.ttf', 32)
BASICFONT3 = pygame.font.Font('freesansbold.ttf', 64)
BASICFONT4 = pygame.font.Font('freesansbold.ttf', 96)
infoSurf = BASICFONT.render('DV GROUP V1.0', 1, YELLOW)
infoRect = infoSurf.get_rect()
infoRect.topleft = (10, WINDOWHEIGHT - 25)
date1 = 0
tempconsigne = 25  
tempmem = 0
tempmem2 = 0
date = 0
date2 = 0
date3 = 0
date4 = 0
date5 = 0
instant = 0
instant2 = "Attente"
datedepart = datetime.datetime.now()
instant1 = (str(datedepart.hour) + ':' + str(datedepart.minute)+ ':' + str(datedepart.second))

while True: # main game loop
    # read temperature connected at CS 22
    a = max6675.read_temp(cs)
    date = datetime.datetime.now()
    instant = (str(date.hour) + ':' + str(date.minute)+ ':' + str(date.second))

    if (a >= tempconsigne) and (tempmem == 0):
        tempmem =1
        date1 = datetime.datetime.now()
        instant2 = (str(date1.hour) + ':' + str(date1.minute)+ ':' + str(date1.second))
    if (a >= tempconsigne) and (tempmem == 1):
        date2 = date-date1
        #instant2 = (str(date.hour) + ':' + str(date.minute)+ ':' + str(date.second))

    if (a <= 24) and (tempmem == 1) and (tempmem2 == 0):
        date3 = datetime.datetime.now()
        tempmem2 == 1
    #instant3 = (str(date3.hour) + ‘:’ + str(date3.minute)+ ‘:’ + str(date3.second))
    
    if (a <= 24) and (tempmem == 1) and (tempmem2 == 1):
        date4 = datetime.datetime.now()
        tempmem2 == 1
    #instant4 = (str(date4.hour) + ‘:’ + str(date4.minute)+ ‘:’ + str(date4.second))
    #resultat4 = (instant4-instant3)

    if (a >= tempconsigne) and (tempmem == 1) and (tempmem2 == 1):
        date5 = datetime.datetime.now()
        tempmem2 == 0
    #instant5 = (str(date5.hour) + ‘:’ + str(date5.minute)+ ‘:’ + str(date5.second))
    #instant2 = (instant2-resultat4)  
    
    DISPLAYSURF.fill(bgColor)
    DISPLAYSURF.blit(infoSurf, infoRect)
    #affichage heure
    scoreSurf = BASICFONT.render('' + str(instant), 1, WHITE)
    scoreRect = scoreSurf.get_rect()
    scoreRect.topleft = (WINDOWWIDTH - 100, WINDOWHEIGHT - 25)
    DISPLAYSURF.blit(scoreSurf, scoreRect)
    #affichage heure demarrage
    scoreSurf = BASICFONT2.render('Heure de départ:' + str(instant1), 1, YELLOW)
    scoreRect = scoreSurf.get_rect()
    scoreRect.topleft = (10, 0)
    DISPLAYSURF.blit(scoreSurf, scoreRect)
    #affichage heure temp atteind
    scoreSurf = BASICFONT2.render('Heure temp ok:' + str(instant2), 1, YELLOW)
    scoreRect = scoreSurf.get_rect()
    scoreRect.topleft = (10, 30)
    DISPLAYSURF.blit(scoreSurf, scoreRect)
    #affiche text temps etuvage
    scoreSurf1 = BASICFONT2.render('Temps d étuvage: ', 1, RED)
    scoreRect1 = scoreSurf1.get_rect()

    scoreRect1.topleft = (10, 60)
    DISPLAYSURF.blit(scoreSurf1, scoreRect1)
    #affiche compteur temps etuvage 
    scoreSurf1 = BASICFONT3.render(str(date2), 1, RED)
    scoreRect1 = scoreSurf1.get_rect()
    scoreRect1.topleft = (10, 85)
    DISPLAYSURF.blit(scoreSurf1, scoreRect1)
    #affiche text temperature four 
    scoreSurf1 = BASICFONT2.render('Température Four', 1, BLUE)
    scoreRect1 = scoreSurf1.get_rect()
    scoreRect1.topleft = (10, 150)
    DISPLAYSURF.blit(scoreSurf1, scoreRect1)
    #affiche temperature four 
    scoreSurf1 = BASICFONT3.render(str(round(a,0)) + '°C', 1, BLUE)
    scoreRect1 = scoreSurf1.get_rect()
    scoreRect1.topleft = (10, 180)
    DISPLAYSURF.blit(scoreSurf1, scoreRect1)
    #affiche  consigne temperature
    scoreSurf1 = BASICFONT2.render('Consigne de température', 1, GREEN)
    scoreRect1 = scoreSurf1.get_rect()
    scoreRect1.topleft = (10, 245)
    DISPLAYSURF.blit(scoreSurf1, scoreRect1)
    #affiche  temperature de consigne 
    scoreSurf1 = BASICFONT3.render(str(round(tempconsigne,0)) + '°C', 1, GREEN)
    scoreRect1 = scoreSurf1.get_rect()
    scoreRect1.topleft = (10, 280)
    DISPLAYSURF.blit(scoreSurf1, scoreRect1)
    
    checkForQuit()
    #max6675.time.sleep(2)
    pygame.display.update()
    pygame.time.wait(1000)

Et le test 2 ça donne quoi ?

D’accord, je n’avais pas vu la modification de ton message, j’effectue les 3 test et je revien vers toi.

Voila les 3 test sont réalisé.

Test 1 : Le résultat est identique, le chrono continue de compter en tache de fond lorsque T<24.

Test 2 : Lorsque je lance le programme, le chronomètre se lance directement et une fois passer le seuil des 25°C celui ci se transforme en minuteur et decompte de 24:00:00 à 0.
d’après mon analyse, le chrono affiché lorsque T<25°C est égal au décompte lorsque T>=25°C
Comprend tu ou veux tu une explication plus précise ?

Test 3 : une erreur s’affiche sur la ligne DISPLAYSURF car il n’y a aucune tache apres :
if (a >= 24) and (tempmem == 1)

C’est déjà pas mal si ya pas d’erreurs de syntaxe sur les test 1 et 2.

Test 2
Je veux bien plus d’explications plus précise…
Je comprends pas pourquoi il se lance direct au démarrage. Ah si, mets 1 au lieu de 0 sur le second bloc collé.
if (a <= 24) and (tempmem == 1)
Là il devrait pas lancer le chrono au démarrage déjà.

Pense à m envoyer un imprim écran du compteur parceque là je travaille à l’aveugle lol

Alors,

La pièce réchauffe x) j’ai donc changer la consigne je suis désormais à 27°C de consigne, concernant le programme, les ajustement à la consigne ont été réalisé ( (a <= 26) au lieu de (a <= 24) ).

Concernant le test 2, lors du lancement du programme, le chrono ne se lance pas ( une chose de régler ).

Une fois le seuil dépasser, ce n’est pas un chrono mais un minuteur ; c’est a dire que le chrono affiche 24 : 00 : 00 et descend dans le temp jusque 23 : 59 : 36 par expemple.

Une fois la température redescendu en dessous du seuil, le chronomètre se rénitialise à 24 : 00 : 00 puis recommence un décompte lorsque le seuil est dépassé.

Je suppose donc qu’il manque l’addition de ces temps au lieu que le chrono se rénitialise a chaque fois.

Concernant l’imprim écran, le site n’accepte pas mes pièces joint (dossier trop imposant). pour te donner une petite idée, il s’agit d’une fenêtre sur PC, avec l’affiche de :

  • Temps d’etuvage ( representant le chrono )
  • Température four
  • Température consigne

Tu peux reduire l image avec paint brush mais bon c pas important… je m’imagine le mini compteur).

Teste de remplacer date-date1 par date1-1000 pour voir

Message erreur :

date2 = date1 - 1000

Type error :
unsupported operend type(s) fort -: ‹ datetime.datetime › and ‹ int ›

T’as modifié au bon endroit ?
Faire ces modifications dans le bloc que tu as collé (voir exemple 1)

Et avec des parenthèses ? (exemple 2)
(date1-1000)

Ou essayé (exemple 3)
str(date.second-1)

Ou essayé (exemple 4)
str(date.second)-1)

Exemple 5 : ajouter -1 à la fin du bloc2


Exemples sur le bloc2 que tu as collé :

Exemple 1
if (a <= 26) and (tempmem == 1): tempmem =1 date1 = datetime.datetime.now() instant2 = (str(date1.hour) + ‘:’ + str(date1.minute)+ ‘:’ + str(date1.second)) if (a <= 26) and (tempmem == 1): date2 = date-1000 #instant2 = (str(date.hour) + ‘:’ + str(date.minute)+ ‘:’ + str(date.second))

Exemple2
if (a <= 26) and (tempmem == 1): tempmem =1 date1 = datetime.datetime.now() instant2 = (str(date1.hour) + ‘:’ + str(date1.minute)+ ‘:’ + str(date1.second)) if (a <= 26) and (tempmem == 1): date2 = (date-1000) #instant2 = (str(date.hour) + ‘:’ + str(date.minute)+ ‘:’ + str(date.second))

Exemple 3
if (a <= 26) and (tempmem == 1): tempmem =1 date1 = datetime.datetime.now() instant2 = (str(date1.hour) + ‘:’ + str(date1.minute)+ ‘:’ + str(date1.second)) if (a <= 26) and (tempmem == 1): date2 = date-date1 #instant2 = (str(date.hour) + ‘:’ + str(date.minute)+ ‘:’ + str(date.second-1))

Exemple 4
if (a <= 26) and (tempmem == 1): tempmem =1 date1 = datetime.datetime.now() instant2 = (str(date1.hour) + ‘:’ + str(date1.minute)+ ‘:’ + str(date1.second)) if (a <= 26) and (tempmem == 1): date2 = date-date1 #instant2 = (str(date.hour) + ‘:’ + str(date.minute)+ ‘:’ + str(date.second)-1)

Exemple 5
if (a <= 26) and (tempmem == 1): tempmem =1 date1 = datetime.datetime.now() instant2 = (str(date1.hour) + ‘:’ + str(date1.minute)+ ‘:’ + str(date1.second)) if (a <= 26) and (tempmem == 1): date2 = date-date1 #instant2 = (str(date.hour) + ‘:’ + str(date.minute)+ ‘:’ + str(date.second))-1000

Je reprend a 14h je ferait donc les test a ma reprise
Tu veux que je test les 4 exemples ? Je remplace le bloc que j’ai collé par les exemples et j’essai ?

Pas besoin de recopier et coller tous le bloc2,
juste faire les mini modifications suivant les exemples.

Essai tous les exemples

j’essai en gardant quel test ? le 1, le 2 ou le 3 ?

Essais l exemple 3 et 4, ça me parait pas mal

L’exemple 3 mais je l’introduit dans quel test ? on a fait 3 tes tout a l’heure ( test 1, test 2 et test 3)

C’est le test 2

Sur le bloc2 que tu as collé

Au final tu as
bloc1 d’origine et le bloc2 que tu as collé

if (a >= tempconsigne) and (tempmem == 0): tempmem =1 date1 = datetime.datetime.now() instant2 = (str(date1.hour) + ‘:’ + str(date1.minute)+ ‘:’ + str(date1.second)) if (a >= tempconsigne) and (tempmem == 1): date2 = date1-date #instant2 = (str(date.hour) + ‘:’ + str(date.minute)+ ‘:’ + str(date.second))

if (a <= 26) and (tempmem == 0): tempmem =1 date1 = datetime.datetime.now() instant2 = (str(date1.hour) + ‘:’ + str(date1.minute)+ ‘:’ + str(date1.second)) if (a <= 26) and (tempmem == 1): date2 = date-date1 #instant2 = (str(date.hour) + ‘:’ + str(date.minute)+ ‘:’ + str(date.second)-1)

pour éviter les erreur de syntaxe je vais remplacer ce que j’ai par cette partie de programme que tu viens de me fournir et je lance le test

Oui bonne idée
Mais ya juste -1 à ajouter vers la fin du bloc2

En fait on enleverait une seconde au comptage quand il est sous 26°

Alors pour refaire un bilan de l’ensemble. Voila le programme complet après modification :

# before import the max6675, you must save the max6675.py file at "/usr/lib/python2.7/dist-packages"

# wiring
# Raspberry         MAX6675
#       GND   ------   GND
#        5V     ------   VCC
#   pin 18     ------   SCK
#   pin 22     ------   CS
#   pin 16     ------   SO

import random, sys, time, pygame, datetime, max6675
from pygame.locals import *

# set the pin for communicate with MAX6675
cs = 22
sck = 18
so = 16

# max6675.set_pin(CS, SCK, SO, unit)   [unit : 0 - raw, 1 - Celsius, 2 - Fahrenheit]
max6675.set_pin(cs, sck, so, 1)


FPS = 30
WINDOWWIDTH = 1280
WINDOWHEIGHT = 960
FLASHSPEED = 500 # in milliseconds
FLASHDELAY = 200 # in milliseconds
BUTTONSIZE = 200
BUTTONGAPSIZE = 20
TIMEOUT = 4 # seconds before game over if no button is pushed.

#                R    G    B
WHITE        = (255, 255, 255)
BLACK        = (  0,   0,   0)
BRIGHTRED    = (255,   0,   0)
RED          = (155,   0,   0)
BRIGHTGREEN  = (  0, 255,   0)
GREEN        = (  0, 155,   0)
BRIGHTBLUE   = (  0,   0, 255)
BLUE         = (  0,   0, 155)
BRIGHTYELLOW = (255, 255,   0)
YELLOW       = (155, 155,   0)
DARKGRAY     = ( 40,  40,  40)
bgColor = BLACK


XMARGIN = int((WINDOWWIDTH - (2 * BUTTONSIZE) - BUTTONGAPSIZE) / 2)
YMARGIN = int((WINDOWHEIGHT - (2 * BUTTONSIZE) - BUTTONGAPSIZE) / 2)

# Rect objects for each of the four buttons
YELLOWRECT = pygame.Rect(XMARGIN, YMARGIN, BUTTONSIZE, BUTTONSIZE)
BLUERECT   = pygame.Rect(XMARGIN + BUTTONSIZE + BUTTONGAPSIZE, YMARGIN, BUTTONSIZE, BUTTONSIZE)
REDRECT    = pygame.Rect(XMARGIN, YMARGIN + BUTTONSIZE + BUTTONGAPSIZE, BUTTONSIZE, BUTTONSIZE)
GREENRECT  = pygame.Rect(XMARGIN + BUTTONSIZE + BUTTONGAPSIZE, YMARGIN + BUTTONSIZE + BUTTONGAPSIZE, BUTTONSIZE, BUTTONSIZE)
score = 0

def main():
    global FPSCLOCK, DISPLAYSURF, BASICFONT, BEEP1, BEEP2, BEEP3, BEEP4

def terminate():
    pygame.quit()
    sys.exit()

def checkForQuit():
    for event in pygame.event.get(QUIT): # get all the QUIT events
        terminate() # terminate if any QUIT events are present
    for event in pygame.event.get(KEYUP): # get all the KEYUP events
        if event.key == K_ESCAPE:
            terminate() # terminate if the KEYUP event was for the Esc key
        #pygame.event.post(event) # put the other KEYUP event objects back


pygame.init()
FPSCLOCK = pygame.time.Clock()
DISPLAYSURF = pygame.display.set_mode((WINDOWWIDTH, WINDOWHEIGHT))
pygame.display.set_caption('Contrôle du four!')
BASICFONT = pygame.font.Font('freesansbold.ttf', 16)
BASICFONT2 = pygame.font.Font('freesansbold.ttf', 32)
BASICFONT3 = pygame.font.Font('freesansbold.ttf', 64)
BASICFONT4 = pygame.font.Font('freesansbold.ttf', 96)
infoSurf = BASICFONT.render('DV GROUP V1.0', 1, YELLOW)
infoRect = infoSurf.get_rect()
infoRect.topleft = (10, WINDOWHEIGHT - 25)
date1 = 0
tempconsigne = 27  
tempmem = 0
tempmem2 = 0
date = 0
date2 = 0
date3 = 0
date4 = 0
date5 = 0
instant = 0
instant2 = "Attente"
datedepart = datetime.datetime.now()
instant1 = (str(datedepart.hour) + ':' + str(datedepart.minute)+ ':' + str(datedepart.second))

while True: # main game loop
    # read temperature connected at CS 22
    a = max6675.read_temp(cs)
    date = datetime.datetime.now()
    instant = (str(date.hour) + ':' + str(date.minute)+ ':' + str(date.second))

    if (a >= tempconsigne) and (tempmem == 0):
        tempmem =1 
        date1 = datetime.datetime.now()
        instant2 = (str(date1.hour) + ':' + str(date1.minute)+ ':' + str(date1.second)) 

    if (a >= tempconsigne) and (tempmem == 1): 
        date2 = date1-date
        #instant2 = (str(date.hour) + ':' + str(date.minute)+ ':' + str(date.second))

    if (a <= 26) and (tempmem == 1): 
        tempmem =1 
        date1 = datetime.datetime.now() 
        instant2 = (str(date1.hour) + ':' + str(date1.minute)+ ':' + str(date1.second))

    if (a <= 26) and (tempmem == 1):
        date2 = date-date1
        #instant2 = (str(date.hour) + ':' + str(date.minute)+ ':' + str(date.second)-1)


    
    
    DISPLAYSURF.fill(bgColor)
    DISPLAYSURF.blit(infoSurf, infoRect)
    #affichage heure
    scoreSurf = BASICFONT.render('' + str(instant), 1, WHITE)
    scoreRect = scoreSurf.get_rect()
    scoreRect.topleft = (WINDOWWIDTH - 100, WINDOWHEIGHT - 25)
    DISPLAYSURF.blit(scoreSurf, scoreRect)
    #affichage heure demarrage
    scoreSurf = BASICFONT2.render('Heure de départ:' + str(instant1), 1, YELLOW)
    scoreRect = scoreSurf.get_rect()
    scoreRect.topleft = (10, 0)
    DISPLAYSURF.blit(scoreSurf, scoreRect)
    #affichage heure temp atteind
    scoreSurf = BASICFONT2.render('Heure temp ok:' + str(instant2), 1, YELLOW)
    scoreRect = scoreSurf.get_rect()
    scoreRect.topleft = (10, 30)
    DISPLAYSURF.blit(scoreSurf, scoreRect)
    #affiche text temps etuvage
    scoreSurf1 = BASICFONT2.render('Temps d étuvage: ', 1, RED)
    scoreRect1 = scoreSurf1.get_rect()

    scoreRect1.topleft = (10, 60)
    DISPLAYSURF.blit(scoreSurf1, scoreRect1)
    #affiche compteur temps etuvage 
    scoreSurf1 = BASICFONT3.render(str(date2), 1, RED)
    scoreRect1 = scoreSurf1.get_rect()
    scoreRect1.topleft = (10, 85)
    DISPLAYSURF.blit(scoreSurf1, scoreRect1)
    #affiche text temperature four 
    scoreSurf1 = BASICFONT2.render('Température Four', 1, BLUE)
    scoreRect1 = scoreSurf1.get_rect()
    scoreRect1.topleft = (10, 150)
    DISPLAYSURF.blit(scoreSurf1, scoreRect1)
    #affiche temperature four 
    scoreSurf1 = BASICFONT3.render(str(round(a,0)) + '°C', 1, BLUE)
    scoreRect1 = scoreSurf1.get_rect()
    scoreRect1.topleft = (10, 180)
    DISPLAYSURF.blit(scoreSurf1, scoreRect1)
    #affiche  consigne temperature
    scoreSurf1 = BASICFONT2.render('Consigne de température', 1, GREEN)
    scoreRect1 = scoreSurf1.get_rect()
    scoreRect1.topleft = (10, 245)
    DISPLAYSURF.blit(scoreSurf1, scoreRect1)
    #affiche  temperature de consigne 
    scoreSurf1 = BASICFONT3.render(str(round(tempconsigne,0)) + '°C', 1, GREEN)
    scoreRect1 = scoreSurf1.get_rect()
    scoreRect1.topleft = (10, 280)
    DISPLAYSURF.blit(scoreSurf1, scoreRect1)
    
    checkForQuit()
    #max6675.time.sleep(2)
    pygame.display.update()
    pygame.time.wait(1000)

J’ai ensuite lancé le programme, je vais décrire celui-ci du mieux que je peux :

dans un premier temps --> RUN MODULE

  • Consigne de température à 27°C et température ambiante 24°C : chronomètre affiche 0
  • Je monte donc en température pour dépasser le seuil de 27°C
  • Température à 28°C : chronomètre affiche 24 : 00 : 00 puis décompte
  • la température redescend à 26°C : chronomètre affiche et bloque à 23 : 58 : 46
  • Au bout d’une dizaine de seconde sans remonter la température le chronomètre se rénitialise et affiche 23 : 59 : 59

Donc si on remonte en température, le chronomètre recommencera à décompter, et ainsi de suite.

Ce que je ne comprend pas c’est pourquoi ce n’est plus un chrono mais un minuteur ?