first commit
This commit is contained in:
Executable
+19
@@ -0,0 +1,19 @@
|
||||
#MESSAGE TEMPERATURE/HUMIDITE
|
||||
#
|
||||
if {$cmd == "11"} {
|
||||
set temphum [exec sudo python /home/pi/Adafruit_Python_DHT/examples/AdafruitDHT.py 11 4];
|
||||
set temperature [string range $temphum 5 8]
|
||||
set humidity [string range $temphum 21 24]
|
||||
#TEMPERATURE EXTERIEUR:
|
||||
puts " Température: $temperature °C"
|
||||
playMsg "SVXCard/Weatherstation" "tempext";
|
||||
playTemp $temperature;
|
||||
|
||||
#HUMIDITY OUT
|
||||
puts "Humidité $humidity %"
|
||||
playMsg "SVXCard/Weatherstation" "humidityout";
|
||||
playNumber $humidity;
|
||||
playMsg "Default" "percent";
|
||||
|
||||
return 1
|
||||
}
|
||||
Reference in New Issue
Block a user