Electronic Components Datasheet Search
  English  ▼

X  

2821 Datasheet(PDF) 30 Page - Adafruit Industries

Part # 2821
Description  Adafruit Feather HUZZAH ESP8266
PDF  42 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  ADAFRUIT [Adafruit Industries]
Direct Link  https://www.adafruit.com/
Logo ADAFRUIT - Adafruit Industries

2821 Datasheet(HTML) 30 Page - Adafruit Industries

Back Button 2821 Datasheet HTML 26Page - Adafruit Industries 2821 Datasheet HTML 27Page - Adafruit Industries 2821 Datasheet HTML 28Page - Adafruit Industries 2821 Datasheet HTML 29Page - Adafruit Industries 2821 Datasheet HTML 30Page - Adafruit Industries 2821 Datasheet HTML 31Page - Adafruit Industries 2821 Datasheet HTML 32Page - Adafruit Industries 2821 Datasheet HTML 33Page - Adafruit Industries 2821 Datasheet HTML 34Page - Adafruit Industries Next Button
Zoom Inzoom in Zoom Outzoom out
 30 / 42 page
background image
We can connect to the access point with wifi.sta.config and wifi.sta.connect - it will take a second or two to complete
the connection, you can query the module to ask the status with wifi.sta.status() - when you get a 5 it means the
connection is completed and DHCP successful
WebClient example
Once you're 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:
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/ for the details on what functions are available to you, as well as
http://www.lua.org to learn more about the Lua scripting language
-- print ap list
function listap(t)
for ssid,v in pairs(t) do
authmode, rssi, bssid, channel = string.match(v, "(%d),(-?%d+),(%x%x:%x%x:%x%x:%x%x:%x%x:%x%x),(%d+)"
print(ssid,authmode,rssi,bssid,channel)
end
end
wifi.sta.getap(listap)
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,"207.58.139.247")
sk:send("GET /testwifi/index.html HTTP/1.1\r\nHost: www.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,"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"
© Adafruit Industries
https://learn.adafruit.com/adafruit-feather-huzzah-esp8266
Page 30 of 42



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com