Adafruit Feather Huzzah ESP8266
Page content
Got a new Toy …
Datasheet esp8266
https://cdn-learn.adafruit.com/downloads/pdf/adafruit-feather-huzzah-esp8266.pdf
Pinout
Manual Adafruit NeoPixel Überguide
Driver
https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers
Wire Diagram
https://learn.adafruit.com/feather-weather-lamp/circuit-diagram
ESP8266 Arduino Core’s documentation
https://arduino-esp8266.readthedocs.io/en/latest/
ESP8266WiFi library
https://arduino-esp8266.readthedocs.io/en/latest/esp8266wifi/readme.html
Playing with LED
gpio.mode(3, gpio.OUTPUT)
gpio.write(3, gpio.LOW)
gpio.write(3, gpio.HIGH)
Blinking Stuff
while 1 do
gpio.write(3, gpio.HIGH)
tmr.delay(1000000) -- wait 1'000'000 us = 1 Second
gpio.write(3, gpio.LOW)
tmr.delay(1000000) -- wait 1'000'000 us = 1 Second
end
More blinking
-- Pin definition
local pin = 3
local status = gpio.LOW
local duration = 1000 -- 1 second duration for timer
-- Initialising pin
gpio.mode(pin, gpio.OUTPUT)
gpio.write(pin, status)
-- Create an interval
tmr.alarm(0, duration, 1, function ()
if status == gpio.LOW then
status = gpio.HIGH
else
status = gpio.LOW
end
gpio.write(pin, status)
end)
Get SSID’s
wifi.setmode(wifi.STATION)
-- print ap list
function listap(t)
for k,v in pairs(t) do
print(k.." : "..v)
end
end
wifi.sta.getap(listap)
More SSID
wifi.setmode(wifi.STATION)
-- 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)
Connect to Wlan
wifi.sta.config("SSID","PASSWORT")
wifi.sta.connect()
tmr.delay(1000000) -- wait 1,000,000 us = 1 second
print(wifi.sta.status())
print(wifi.sta.getip())
Arduino & IDE
https://learn.adafruit.com/adafruit-io-basics-esp8266-arduino/using-arduino-ide
Any Comments ?
sha256: fd531fbf1937cd30349753289d3601fb1de135e6b5866266385e45373d851f6e