Jeśli zastanawiałeś się kiedyś nad tym czy Java, .NET i wielkie korporacyjne systemy to jedyne miejsce, gdzie programowanie może być ciekawe to ta prezentacja jest właśnie dla Ciebie!
Z pomocą maluteńkiego modułu z niesamowitym mikrokontrolerem ESP8266 zbudujemy system sterujący oświetleniem, który z powodzeniem może zostać użyty w domu.
Otwórz się na świat Internet of Things i poczuj magię mikrokontrolerów 21-go wieku!
41. https://bit.ly/nodemcu-tool
● Upload Lua files to your ESP8266/NodeMCU module
● Upload any file-types (binary save)
● Bulk/Multi file uploads
● Download any file-type (binary save)
● Delete files
● Format the file system
● Simple Serial Terminal to interact with NodeMCU
● Show existing files on your module
● … and much more!
44. Connecting to NodeMCU
$ nodemcu-tool terminal
> node.restart()
….
NodeMCU custom build by frightanic.com
branch: dev
commit: e90ffb42667da287537c269c967cb9d723edb376
SSL: false
modules: adc,bit,bmp085,dht,file,gpio,i2c,mqtt,net,node,rfswitch,sjson,tmr,uart,websocket,wifi
build built on: 2017-05-22 08:54
powered by Lua 5.1.4 on SDK 2.1.0(116b762)
lua: cannot open init.lua
>
45. Setting up a access point
wifi.ap.config({
ssid = "esp8266-"..node.chipid(), pwd = "Passw0rd1" })
wifi.ap.setip({
ip = "10.0.1.1", netmask = "255.0.0.0", gateway = "10.0.1.1" })
wifi.setmode(wifi.SOFTAP)
47. Managing digital input/output
> -- set D0 as OUTPUT
> gpio.mode(0, gpio.OUTPUT)
> -- set D0 state to HIGH
> gpio.write(0, gpio.HIGH)
> -- set D0 state to LOW
> gpio.write(0, gpio.LOW)