File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 1010
1111### INITIALISATION
1212
13- print ("Ouverture de Xampp..." )
14- os .system (r"c: && cd C:\xampp && xampp_start" ) #On lance xampp
1513
1614connection = mysql .connector .connect (host = 'localhost' , database = '' , user = 'root' , password = '' )
1715curseur = connection .cursor ()
@@ -47,6 +45,9 @@ def ajout_temperature_BDD(temperature):
4745 except shutil .Error : #Si le fichier a deja été déplacé
4846 pass
4947
48+ print ("Ouverture de Xampp..." )
49+ os .system (r"c: && cd C:\xampp && xampp_start" ) #On lance xampp
50+
5051webbrowser .open ("http://localhost/phpmyadmin/sql.php?db=temperatures&table=temperatures_glaciere&pos=0" )
5152webbrowser .open ("http://localhost/suivi_temperature_glaciere.php" ) #On ouvre le site en local
5253
@@ -65,9 +66,9 @@ def publication(topic, message): #On publie un topic et un message
6566
6667ARDUINO = "COM3" #On part du principe que la carte Arduino se trouve sur le port 3
6768ser = serial .Serial (ARDUINO , timeout = 1 ) #On lit le port de la carte Arduino
69+ ser .flushInput ()
6870
6971while True : #Boucle infinie
70- ser .flushInput ()
7172 serialValue = ser .readline ().strip ()
7273 if len (serialValue ) == 5 : #On filtre la valeur pour n'avoir que la température
7374 # if serialValue != valeur_precedente:
You can’t perform that action at this time.
0 commit comments