Professional Documents
Culture Documents
Gambar Rangkaian
LAMPIRAN 4. KODE PROGRAM
--ESP_STATION--
wifi.sta.setip({ip="192.168.1.101",netmask="255.255.255.0",gateway="
192.168.1.1"})
wifi.setmode(wifi.STATION)
wifi.sta.config("Tenda","12345678")
wifi.sta.autoconnect(1)
txt="";
x1="0,";
x2="0,";
x3="0,";
x4="0,";
--Menunggu Data Masuk--
responseHeader = function(code, type)
return "HTTP/1.1 " .. code .. "\r\nConnection: close\r\nServer:
nunu-Luaweb\r\nContent-Type: " .. type .. "\r\n\r\n";
end