From a64718351f3abc714f5d2078b63cce311b16b9f0 Mon Sep 17 00:00:00 2001 From: Christian Zufferey Date: Sat, 27 Jul 2019 13:55:40 +0200 Subject: [PATCH] =?UTF-8?q?Cela=20commence=20=C3=A0=20fonctionner,=20autom?= =?UTF-8?q?atiquement=20le=20nodemcu=20du=20nord=20envoie=20sa=20temp?= =?UTF-8?q?=C3=A9rature=20sur=20le=20hub=20du=20sud=20;-)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Temp_DS18B20/temp_zf/0_cron_temp.lua | 9 +++++++++ Temp_DS18B20/temp_zf/a4.lua | 16 ---------------- Temp_DS18B20/temp_zf/boot.lua | 3 ++- Temp_DS18B20/temp_zf/disp_temp.html | 8 +++++--- 4 files changed, 16 insertions(+), 20 deletions(-) create mode 100644 Temp_DS18B20/temp_zf/0_cron_temp.lua delete mode 100644 Temp_DS18B20/temp_zf/a4.lua diff --git a/Temp_DS18B20/temp_zf/0_cron_temp.lua b/Temp_DS18B20/temp_zf/0_cron_temp.lua new file mode 100644 index 0000000..baaad9d --- /dev/null +++ b/Temp_DS18B20/temp_zf/0_cron_temp.lua @@ -0,0 +1,9 @@ +-- Petit script pour faire office de crontab pour les mesures de température +print("\n 0_cron_temp.lua zf190727.1336 \n") + + cron1=tmr.create() + cron1:alarm(10*1000, tmr.ALARM_AUTO, function() + get_temp() + end) + + diff --git a/Temp_DS18B20/temp_zf/a4.lua b/Temp_DS18B20/temp_zf/a4.lua deleted file mode 100644 index 0e6fdf0..0000000 --- a/Temp_DS18B20/temp_zf/a4.lua +++ /dev/null @@ -1,16 +0,0 @@ --- programme pour faire un test depuis de le webide - -function a4() - print("\n a4.lua zf190617.1125 \n") - -end - -a4() - - - cron1=tmr.create() - cron1:alarm(20*1000, tmr.ALARM_AUTO, function() - f= "a2.lua" if file.exists(f) then dofile(f) end - end) - - diff --git a/Temp_DS18B20/temp_zf/boot.lua b/Temp_DS18B20/temp_zf/boot.lua index 949ff95..8121b49 100644 --- a/Temp_DS18B20/temp_zf/boot.lua +++ b/Temp_DS18B20/temp_zf/boot.lua @@ -1,6 +1,6 @@ -- Scripts à charger après le boot pour démarrer son appli -print("\n boot.lua zf190727.1329 \n") +print("\n boot.lua zf190727.1341 \n") function heartbeat() f= "flash_led_xfois.lua" if file.exists(f) then dofile(f) end @@ -28,6 +28,7 @@ f= "web_srv2.lua" if file.exists(f) then dofile(f) end f= "0_get_temp.lua" if file.exists(f) then dofile(f) end f= "0_send_temp.lua" if file.exists(f) then dofile(f) end +f= "0_cron_temp.lua" if file.exists(f) then dofile(f) end f=nil --heartbeat=nil diff --git a/Temp_DS18B20/temp_zf/disp_temp.html b/Temp_DS18B20/temp_zf/disp_temp.html index a17bc61..ffd491c 100644 --- a/Temp_DS18B20/temp_zf/disp_temp.html +++ b/Temp_DS18B20/temp_zf/disp_temp.html @@ -7,7 +7,7 @@ -

Affichage des températures 190727.0951

+

Affichage des températures 190727.1349


Les températures mesurées sont:
@@ -17,11 +17,13 @@ zout("
Température intérieure chambre à coucher "..ztemp1.."°C") end if (ztemp2 ~= nil) then - zout("
Température extérieure sud "..ztemp2.."°C") + zout("
Température extérieure sud (nodemcu 29) "..ztemp2.."°C") end if (ztemp3 ~= nil) then - zout("
Température extérieure nord "..ztemp3.."°C") + zout("
Température extérieure nord (nodemcu 30) "..ztemp3.."°C") end + + zout("

RAM: "..node.heap().."
") %>