diff --git a/Mesures/humidity/solar-grafana/0_2_htu21d.lua b/Mesures/humidity/solar-grafana/0_2_htu21d.lua index f6070c3..79664bb 100644 --- a/Mesures/humidity/solar-grafana/0_2_htu21d.lua +++ b/Mesures/humidity/solar-grafana/0_2_htu21d.lua @@ -2,9 +2,9 @@ -- https://github.com/zuzu59/NodeMCU_Lua/tree/master/Mesures/humidity/bolo-thingspeak/docu/HTU21D.txt function readHTU21D() - if verbose then print("\n 0_2_htu21d.lua zf200523.1816 \n") end + if verbose then print("\n 0_2_htu21d.lua zf200523.1839 \n") end - id = 0 sda = 5 scl = 4 addr = 0x40 + id = 0 sda = 5 scl = 7 addr = 0x40 HUMIDITY = 0xE5 TEMPERATURE = 0xE3 i2c.setup(id, sda, scl, i2c.SLOW) sda = nil scl = nil diff --git a/Mesures/humidity/solar-grafana/0_cron.lua b/Mesures/humidity/solar-grafana/0_cron.lua index 3cd3e69..6602b85 100644 --- a/Mesures/humidity/solar-grafana/0_cron.lua +++ b/Mesures/humidity/solar-grafana/0_cron.lua @@ -1,25 +1,16 @@ -- Petit script pour faire office de crontab pour les mesures -print("\n 0_cron.lua zf200523.1816 \n") +print("\n 0_cron.lua zf200523.1841 \n") cron1=tmr.create() cron1:alarm(5*1000, tmr.ALARM_AUTO, function() if verbose then print("cron1........................") end if verbose then gpio.write(zLED, gpio.LOW) tmr.delay(10000) gpio.write(zLED, gpio.HIGH) end - print("toto1") f = "0_1_htu21d.lua" if file.exists(f) then dofile(f) end - - print("toto2") f = "0_2_htu21d.lua" if file.exists(f) then dofile(f) end - - print("toto3") f = "0_send_data.lua" if file.exists(f) then dofile(f) end - - print("toto4") ztemp1=nil zhum1=nil ztemp2=nil zhum2=nil f = "0_zdyndns.lua" if file.exists(f) then dofile(f) end - - print("toto5") if verbose then print("End cron:\n"..node.heap()) end collectgarbage() diff --git a/Mesures/humidity/solar-grafana/boot.lua b/Mesures/humidity/solar-grafana/boot.lua index 8199834..c58f136 100644 --- a/Mesures/humidity/solar-grafana/boot.lua +++ b/Mesures/humidity/solar-grafana/boot.lua @@ -1,14 +1,14 @@ -- Scripts à charger après le boot pour démarrer son projet -print("\n boot.lua zf200523.1611 \n") +print("\n boot.lua zf200523.1833 \n") function boot() verbose = true print("On lance le boot...") print(node.heap()) collectgarbage() print(node.heap()) --f="0_tst3_socat.lua" if file.exists(f) then dofile(f) end - --f="0_btn_flipflop.lua" if file.exists(f) then dofile(f) end - --f="0_cron.lua" if file.exists(f) then dofile(f) end + f="0_btn_flipflop.lua" if file.exists(f) then dofile(f) end + f="0_cron.lua" if file.exists(f) then dofile(f) end --f = "web_ide2.lua" if file.exists(f) then dofile(f) end print("verbose:",verbose) @@ -17,3 +17,8 @@ function boot() f=nil boot=nil end boot() + +--[[ +verbose = true +verbose = false +]] \ No newline at end of file