You can also have the module do DNS for you, just give it the hostname instead of IP
address:
sk=net.createConnection(net.TCP, 0)
sk:on("receive", function(sck, c) print(c) end )
sk:connect(80,"www.adafruit.com")
sk:send("GET /testwifi/index.html HTTP/1.1\r\nHost: www.adafruit.com\r\nConnection:
keep-alive\r\nAccept: */*\r\n\r\n")
This is just a light overview of testing out your HUZZAH ESP breakout! For much
more, check out NodeMCU's documentation page
ttps://adafru.it/wGB)
http://www.lua.org (https://adafru.it/f1N)
language
Using Arduino IDE
While the Feather HUZZAH ESP8266 comes pre-programmed with NodeMCU's Lua
interpretter, you don't have to use it! Instead, you can use the Arduino IDE which may
be more familar. This will write directly to the firmware, erasing the NodeMCU
firmware,
so if you want to go back to Lua, use the flasher to re-install
adafru.it/f1O)
Don't forget to visit esp8266.com for the latest and greatest in ESP8266 news,
software and
gossip! (https://adafru.it/f1F)
©Adafruit Industries
for the details on what functions are available to you, as well as
to learn more about the Lua scripting
https://nodemcu.readthedocs.io/ (h
it (https://
Page 32 of 53
Need help?
Do you have a question about the Feather HUZZAH ESP8266 and is the answer not in the manual?