Datasheet
WebClient example
Once you've got the IP address you can connect to adafruit, for example, and read a webpage and print it out:
You can also have the module do DNS for you, just give it the hostname instead of IP address:
wifi.sta.config("accesspointname","yourpassword")
wifi.sta.connect()
tmr.delay(1000000) -- wait 1,000,000 us = 1 second
print(wifi.sta.status())
print(wifi.sta.getip())
sk=net.createConnection(net.TCP, 0)
sk:on("receive", function(sck, c) print(c) end )
sk:connect(80,"104.236.193.178")
sk:send("GET /testwifi/index.html HTTP/1.1\r\nHost: wifitest.adafruit.com\r\nConnection: keep-alive\r\nAccept: */*\r\n\r\n"
sk=net.createConnection(net.TCP, 0)
sk:on("receive", function(sck, c) print(c) end )
sk:connect(80,"wifitest.adafruit.com")
sk:send("GET /testwifi/index.html HTTP/1.1\r\nHost: wifitest.adafruit.com\r\nConnection: keep-alive\r\nAccept: */*\r\n\r\n"
© Adafruit Industries https://learn.adafruit.com/adafruit-huzzah-esp8266-breakout Page 27 of 43