esp8266 终于装上固件了!半个月了!开始进军简单粗暴的lua语言!!

第一次测试2017-10-2720:33:33

感谢这位大神的汇总资料太详细了

http://www.cnblogs.com/yangfengwu/p/7524326.html

 

这是调试输出的内容!
1
ESP8266 Started--pengwenzheng--2017.10.27--first test 2 > Connecting..... 3 Connected,IP is 192.168.15.168 4 file.remove("init.lua"); 5 > file.open("init.lua","w+"); 6 > w = file.writeline 7 > w([==[]==]); 8 > w([==[print(" ")]==]); 9 > w([==[print("ESP8266 Started@pengwenzheng##2017.10.27##first test")]==]); 10 > w([==[dofile("wifi.lua")]==]); 11 > file.close(); 12 > dofile("init.lua"); 13 14 15 ESP8266 Started@pengwenzheng##2017.10.27##first test 16 > Connecting..... 17 Connecting..... 18 Connected,IP is 192.168.15.168
################################################
这是lua脚本语言代码

wifi.setmode(wifi.STATION)
wifi.sta.config("maker_space","chuangke666")
wifi.sta.connect()
tmr.alarm(1,1000,1,function()
if wifi.sta.getip() == nil then
print("Connecting.....")
else
tmr.stop(1)
print("Connected,IP is "..wifi.sta.getip())
end
end)

 
@青山不移,文笔不息。学习,坚持,梦想青春!
原文地址:https://www.cnblogs.com/pengwenzheng/p/7745092.html