Post your best Lua script examples here

User avatar
By Pigs Fly
#5860 Before I embark on this path, I thought it worth asking if we already have something close to this:

Module is pre-programmed to send data to a remote server
Module tries to connect to last good AP, if connected, it sends data
If it cannot connect to a stored AP, it switches to AP mode and accepts HTTP connection for configuring a new AP connection (and possibly new remote server).
After a new configuration is submitted via HTTP, it tests the entered info then switches back to station mode and begins sending data again.

..or some variation of the above, perhaps with a button on a GPIO to switch into setup mode instead of doing it when the station connection fails. Something your mother could make work if you sent her one.
User avatar
By alon24
#10765 I too am interseted in this.
I would like a step further too, is there a way to save some more data (ip address of new server) so that I tell the device, to where to connect (from an app?)
That way I do not need to connect it to a known location.

I could ofcourse configure the location of the net, to point to the correct server on my side, but I would like to do this streight on.

So is there a way to write to the device, like there is in arduino eeprom?