Current Lua downloadable firmware will be posted here

User avatar
By gerardwr
#2896
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.
Last edited by gerardwr on Wed Nov 19, 2014 5:53 am, edited 2 times in total.
User avatar
By zeroday
#2898
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.
User avatar
By alonewolfx2
#2899 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.