I managed to load the nodemcu firmware and trying to write a simple program
I wrote config to connect to my wi-fi and it now does this on power up
trying to now write simple http client using the example...
conn=net.createConnection(net.TCP, false)
conn:on("receive", function(conn, pl) print(pl) end)
conn:connect(80,"121.41.33.127")
conn:send("GET / HTTP/1.1\r\nHost: www.nodemcu.com\r\n"
.."Connection: keep-alive\r\nAccept: */*\r\n\r\n")
this don't appear to work or i don't get any output
i am entering code line by line in program mode
I tried the simple http server example and that works but what i did notice was it didn't store the program so I tried to write my program and store as a file like ...
file.remove("web.lua")
file.open("web.lua","w")
... my code
file.close()
What i notice in some of the examples when writing to a file is sometimes it says writeline and in other cases file.writeline so i am confused how to write my code and get the ESP to save it after power off
Any help very much appreciated