Current Lua downloadable firmware will be posted here

User avatar
By zeroday
#2902
alonewolfx2 wrote:What do yo think about source code ;) do you think share soon ;)
zeroday wrote:
Hans174 wrote:Hello,

Is it possible to read and write to the SRAM and port adresses with the current LUA version?
Or is the memory module mentioned in the LUA manual 5.1 necessary?

Background is that I would like to access the ADC (analogue digital converter) of ESP8266 CPU.

Hans


This adc read api will be added soon.
because my module haven't got the adc pin out, I can not test it, so it is not added now.


not now, and not sure how soon. sorry for that.
User avatar
By scargill
#2905 I'm sure I'm going to get called stupid.. but.. I tried your function - it works (I put a little delay in) (NOT tried it on powerup...) but when you power down and up again - that function has disappeared. Was I supposed to do something to make it permanent?
My plan was to then call that from the powerup function - but if its not stored... I can't...


gerardwr wrote:
scargill wrote:I'm struggling here.

I also know how to set the thing into WIFI mode... and os I wrote this startup file - sadly it shows 0.0.0.0 BEFORE and 0,0,0,0 AFTER. I can think of no way to use this stand-alone - if you can't set up the wifi on powerup ???


I use this function, i think it is (very) identical you yours.
Code: Select all-- connect as station to a Wifi Access Point
-- Use as : connecttoap("yourSSID","yourpassword")
connecttoap = function (ssid,pw)
    print(wifi.sta.getip())
    wifi.setmode(wifi.STATION)
    wifi.sta.config(ssid,pw)
    print("Connected to ",ssid," as ",wifi.sta.getip())
end


It takes a few seconds for the ESP to obtain the IP, so the print will list the ip as 0.0.0.0.

You could add a tmr.delay() statement after the wifi.sta.config statement.

Hope this helps, so far the environment works for me.