300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > nodemcu 自建服务器 NodeMCU入门(4):搭建Web服务器 配置网络连接(示例代码)

nodemcu 自建服务器 NodeMCU入门(4):搭建Web服务器 配置网络连接(示例代码)

时间:2022-09-20 22:59:39

相关推荐

nodemcu 自建服务器 NodeMCU入门(4):搭建Web服务器 配置网络连接(示例代码)

准备工作

1.NodeMCU模块

2.ESPlorer v0.2.0-rc6

3.NodeMCU-HTTP-Server

搭建web服务器

修改init.lua文件,可参看NodeMCU-HTTP-Server Example

--init.lua

-----------------------wifi---------------------

print(\Setting up WIFI...\)

wifi.setmode(wifi.STATION)

wifi.sta.config(\WX401901\, \smyh1234\)

wifi.sta.autoconnect(1)

tmr.alarm(1, 1000, tmr.ALARM_AUTO, function()if wifi.sta.getip() == nil then

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。