cendev wrote:init.lua is running at the startup and you can edit that so yes, you can i guess
looks nice just gave it a small try and all looks fine looks like a piece of art since now haven't try the gpio timer also perfect
edit : Yes, you can create your own scripts and call them via dofile or use init.lua
Lets get the party started and +1
[url=https://www.banggood.com/custlink/KvGGhGF4wG[/url]
I like ESP8266 and ESP8285 and ESP32
give me a few mins and i'll inform you but i'm pretty sure yep =)
Yes my friend we can
not exactly what i did but these may give an idea i guess don't laugh too hard for the codes , i was tryin to reach the end as fast as i could
first time connection to network is not included as you know the module remembers that after the first time and autoconnects to network.
the example below is the dumbest way to do that so try not to laugh or curse (it doesnt check for ip or connection but waits for 10 secs and creates the socket )
steps i remember
i created a file via :
file.open("name.lua","w+")
file.writeline([[sk=net.createConnection(net.TCP, false) sk:on("receive", function(sck, c) print(c) end ) sk:connect(15,"192.168.1.2") sk:send("l100")]])
file.close()
and then i edited my init.lua
file.open("init.lua","w+")
file.writeline([[tmr.alarm(10000, 0, function() dofile("name.lua") end )]])
file.close()
after restarting the node , 10 secs later it connected to my server and sent the message