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
https://nodemcu.readthedocs.io/
(h
ttps://adafru.it/wGB)
for the details on what functions are available to you, as well as
(https://adafru.it/f1N)
to learn more about the Lua scripting
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 it
(https://
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
Page 32 of 53
Содержание Feather HUZZAH ESP8266
Страница 4: ...Adafruit Industries Page 4 of 53...