Ajouté un nouveau projet pour mesurer la température dans une pièce avec un DS18B20
This commit is contained in:
43
Temp_DS18B20/temp_zf/a3.lua
Normal file
43
Temp_DS18B20/temp_zf/a3.lua
Normal file
@@ -0,0 +1,43 @@
|
||||
-- programme pour faire un test depuis de le webide
|
||||
|
||||
function a3()
|
||||
print("\n a3.lua zf190617.1135 \n")
|
||||
|
||||
end
|
||||
|
||||
a3()
|
||||
|
||||
|
||||
|
||||
|
||||
-- Petit script pour envoyer quelque chose sur un serveur WEB
|
||||
print("\n web_cli.lua zf190616.1519 \n")
|
||||
|
||||
function disp_send()
|
||||
print("web_cli: ")
|
||||
-- ztemp1=11 ztemp2=12 ztemp3=13
|
||||
|
||||
zurl=thingspeak_url_update.."field1="..tostring(ztemp1).."&field2="..tostring(ztemp2).."&field3="..tostring(ztemp3)
|
||||
print(zurl)
|
||||
http.get(zurl, nil, function(code, data)
|
||||
print("toto")
|
||||
if (code < 0) then
|
||||
print("tutu")
|
||||
print("HTTP request failed")
|
||||
print("zuzu", code, data)
|
||||
else
|
||||
print("titi")
|
||||
print(code, data)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
--disp_send()
|
||||
|
||||
|
||||
--[[
|
||||
disp_send()
|
||||
|
||||
|
||||
|
||||
]]
|
||||
Reference in New Issue
Block a user