Current Lua downloadable firmware will be posted here

User avatar
By cendev
#2564
gerardwr wrote:
zeroday wrote: the coming-soon website try to sell something, it will be a development kit with esp8266+usb-ttl.
but the product is designed for someone who have very less embedded C programming experiences and ZERO hardware experience.
not for someone who is familiar to esp8266 chip, gcc compiler, firmware hacking and sdk stuff.
It will be a "plug and play" development kit, especially for someone have javascript, nodejs, python or arduino experiences.


I think there may be a market for such a board. My suggestion is to support the ADC, with supporting API calls.

zeroday wrote:I hope after some time, there are many lua scripts for this firmware, and connect things to net will be as easy as "hello world".


I've been playing with the API. I like it. Have not used ALL commands but it works very well, excellent job done!

Maybe I'm am missing something but I have found no support for uploading Lua scripts. I understand the concept of the "init.lua" file that runs at boot time. Tried it with a simple command and it works.

Up till now I have used the line mode of Coolterm (on a Mac) to enter the Lua commands. For simple tests that's OK, but for larger scripts that's not usable. I tried uploading a text file using the Coolterm function, but that did not work well. It looks like the input buffer of the ESP822 is overloaded, or that new lines are sent before the previous line was processed by the ESP. Then it reports mysterious errors in lines that work OK in the line mode.

So my question is : What is your proposed way to upload Lua scripts?

Thank you for a wonderful development!


i face the same problem :) i'm planning to use the server example with a bit modification.

Will create a dofile("upload.lua") Which starts a tcp server, waits for connection, sends a connected response. Whenever a packet comes in ill call " on() with a callback function which has :

file.open("file.lua","a+") file.write([[c]]) file.close() // c is the string that came with tcp recieve

i hope it'll work, maybe i can add a send("added") and write an app that connects to server, gets connected response, sends line waits added, sends line........ till the whole input file sent :) may work i guess
User avatar
By terminator
#2565 Is it possible to change baud rate? It would also be good to create some kind of ide for pc for testing lua scripts. Should be easy, just 1 window for creating script with upload button that transfers script to esp over serial.
User avatar
By mcsa
#2569
Code: Select alls=net.createServer(net.TCP)
  s:listen(8888,function(c)
    c:on("receive",function(c,pl)
    print(pl)
    pcall(loadstring(pl))
  end)
end)


Thanks for ex.
How to read and return to tcp client response to the command?
User avatar
By cendev
#2572
mcsa wrote:
Code: Select alls=net.createServer(net.TCP)
  s:listen(8888,function(c)
    c:on("receive",function(c,pl)
    print(pl)
    pcall(loadstring(pl))
  end)
end)


Thanks for ex.
How to read and return to tcp client response to the command?


completely unsure but all my experiences from other langs makes me think like

c:send(pcall(loadstring(pl))

if the command returns something itll be sent, else, u'll send a nil, but i'm kinda away from pc :) haven't tried

also i noticed that if client closes the connection, module gets restarted :S probably my fault caused by codes but if someone else can check that ill be thankfull :)