SlideShare a Scribd company logo
Kamera, Światło, Akcja!
IoT: scentralizowane sterowanie oświetleniem
❏ 32-bit Tensilica RISC MCU
❏ 80/160 MHz clock
❏ 16 pinów cyfrowych
❏ 64kb pamięci instrukcji
❏ 96kb pamięci danych
❏ Do 16MiB zew. pamięci flash (4MB)
❏ IEEE 802.11 b/g/n Wi-Fi
❏ Pełny stos TCP/IP
❏ UART, SPI, I2C
❏ RTOS
5 mm x 5 mm
230V
12V
5V12V
230V
Espressif SDK
Espressif SDK
Espressif SDK
Espressif SDK
https://nodemcu-build.com
https://bit.ly/esptool-py
https://nodemcu.readthedocs.io
https://bit.ly/nodemcu-tool
https://www.lua.org
https://nodemcu-build.com
https://bit.ly/esptool-py
http://padcom13.blogspot.com/2016/11/flashing-nodemcu.html
https://nodemcu.readthedocs.io
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!
https://www.lua.org
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
>
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)
Connecting to
> wifi.sta.config({ ssid = "my-network", pwd = "Passw0rd1" });
> wifi.sta.connect();
> =wifi.sta.getip()
192.168.40.113 255.255.255.0 192.168.40.1
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)
Managing digital input/output
> -- set D0 as INPUT
> gpio.mode(0, gpio.INPUT)
> -- read D0 state
> =gpio.read(0)
1
Managing digital input/output
> -- set D0 as INPUT
> gpio.mode(0, gpio.INPUT)
> -- react on D0 changes
> gpio.trig(pin, "both", function(state, time)
>> print("STATE: " .. state .. ", time: " .. time)
>> end)
MQTT connectivity
> m = mqtt.Client("nodemcu-" .. node.chipid())
> m:connect("192.168.40.1", 1883)
MQTT connectivity
> m:on('connect', function(client)
>> m:subscribe('nodemcu/' .. node.chipid(), 2);
>> m:publish("logs", "nodemcu-" .. node.chipid() .. " alive", 1)
>> end)
MQTT connectivity - Last will nd testament
> m:lwt("logs", "nodemcu-" .. node.chipid() .. " died", 1)
MQTT connectivity
> m:on("message", function(client, topic, message)
>> print('topic: ' .. topic .. ', message: ' .. message)
>> end)
MQTT connectivity - Timers
> tmr.create():alarm(1000, tmr.ALARM_SINGLE, function()
>> print('Hello!')
>> end)
MQTT connectivity - Timers
> mytimer = tmr.create()
> mytimer:register(1000, tmr.ALARM_AUTO, function()
>> print("Hello!")
>> end)
> mytimer:start()
MQTT connectivity - Light sensor
> sensor = 4
> gpio.mode(sensor, gpio.INPUT)
> =gpio.read(sensor)
MQTT connectivity - Light sensor
> light = 5
> gpio.mode(light, gpio.OUTPUT)
> mytimer = tmr.create()
> mytimer:register(1000, tmr.ALARM_AUTO, function()
>> gpio.write(light, gpio.read(sensor))
>> end)
> mytimer:start()
MQTT connectivity - DHT sensor
> pin = 5
> status, temp, humi, temp_dec, humi_dec = dht.read(pin)
> print(temp)
2 Types of Control
> OUTSIDE in <
2 Types of Control
< INSIDE in/out >
Kamery, światło, akcja!
Kamery, światło, akcja!
Kamery, światło, akcja!
Kamery, światło, akcja!
Kamery, światło, akcja!

More Related Content

What's hot

Free5 gc installation
Free5 gc installationFree5 gc installation
Free5 gc installation
Chia-An Lee
 
Vi
ViVi
Asus WL500gP USB Serial
Asus WL500gP USB SerialAsus WL500gP USB Serial
Asus WL500gP USB Serialguestac21b8
 
Hello, Worldまで3ヶ月 Golangでファミコンエミュレータ実装 #gocon fukuoka 2019
Hello, Worldまで3ヶ月 Golangでファミコンエミュレータ実装 #gocon fukuoka 2019Hello, Worldまで3ヶ月 Golangでファミコンエミュレータ実装 #gocon fukuoka 2019
Hello, Worldまで3ヶ月 Golangでファミコンエミュレータ実装 #gocon fukuoka 2019
ichikaway
 
SMP Implementation for OpenBSD/sgi [Japanese Edition]
SMP Implementation for OpenBSD/sgi [Japanese Edition]SMP Implementation for OpenBSD/sgi [Japanese Edition]
SMP Implementation for OpenBSD/sgi [Japanese Edition]
Takuya ASADA
 
Pci passthrough
Pci passthroughPci passthrough
Pci passthrough
Chia-An Lee
 
Vagrant勉強会 チュートリアル編
Vagrant勉強会 チュートリアル編Vagrant勉強会 チュートリアル編
Vagrant勉強会 チュートリアル編
Yasuyuki Sugai
 
Hardware hacking for software people
Hardware hacking for software peopleHardware hacking for software people
Hardware hacking for software people
Dobrica Pavlinušić
 
My bitmap
My bitmapMy bitmap
My bitmap
Milruwan Perera
 
Stm32 develop tool introduction
Stm32 develop tool introductionStm32 develop tool introduction
Stm32 develop tool introduction
冠宇 陳
 
Prototipare col raspberry pi
Prototipare col raspberry piPrototipare col raspberry pi
Prototipare col raspberry pi
Gabriele Guizzardi
 
32bit Cortex Arduinoの布教とラパイド実験のススメ
32bit Cortex Arduinoの布教とラパイド実験のススメ32bit Cortex Arduinoの布教とラパイド実験のススメ
32bit Cortex Arduinoの布教とラパイド実験のススメ
Yuya Yamada
 
OS-2130D
OS-2130DOS-2130D
Vimrc
VimrcVimrc
Vimrc
Ted Hsu
 
Ensamblar mi pc
Ensamblar mi pcEnsamblar mi pc
Ensamblar mi pc
mabel9380
 
Juniper MX80 Introduction
Juniper MX80 IntroductionJuniper MX80 Introduction
Juniper MX80 Introduction
ZenSekibe
 
RabbitMQ Server - cheat sheet -
RabbitMQ Server - cheat sheet -RabbitMQ Server - cheat sheet -
RabbitMQ Server - cheat sheet -
Naoto MATSUMOTO
 
OpenBSD/sgi SMP implementation for Origin 350
OpenBSD/sgi SMP implementation for Origin 350OpenBSD/sgi SMP implementation for Origin 350
OpenBSD/sgi SMP implementation for Origin 350Takuya ASADA
 
Py drum
Py drumPy drum
Py drum
Jen Yee Hong
 

What's hot (20)

Free5 gc installation
Free5 gc installationFree5 gc installation
Free5 gc installation
 
Vi
ViVi
Vi
 
Asus WL500gP USB Serial
Asus WL500gP USB SerialAsus WL500gP USB Serial
Asus WL500gP USB Serial
 
Hello, Worldまで3ヶ月 Golangでファミコンエミュレータ実装 #gocon fukuoka 2019
Hello, Worldまで3ヶ月 Golangでファミコンエミュレータ実装 #gocon fukuoka 2019Hello, Worldまで3ヶ月 Golangでファミコンエミュレータ実装 #gocon fukuoka 2019
Hello, Worldまで3ヶ月 Golangでファミコンエミュレータ実装 #gocon fukuoka 2019
 
SMP Implementation for OpenBSD/sgi [Japanese Edition]
SMP Implementation for OpenBSD/sgi [Japanese Edition]SMP Implementation for OpenBSD/sgi [Japanese Edition]
SMP Implementation for OpenBSD/sgi [Japanese Edition]
 
Pci passthrough
Pci passthroughPci passthrough
Pci passthrough
 
Vagrant勉強会 チュートリアル編
Vagrant勉強会 チュートリアル編Vagrant勉強会 チュートリアル編
Vagrant勉強会 チュートリアル編
 
OpenBTS AirPutih
OpenBTS AirPutihOpenBTS AirPutih
OpenBTS AirPutih
 
Hardware hacking for software people
Hardware hacking for software peopleHardware hacking for software people
Hardware hacking for software people
 
My bitmap
My bitmapMy bitmap
My bitmap
 
Stm32 develop tool introduction
Stm32 develop tool introductionStm32 develop tool introduction
Stm32 develop tool introduction
 
Prototipare col raspberry pi
Prototipare col raspberry piPrototipare col raspberry pi
Prototipare col raspberry pi
 
32bit Cortex Arduinoの布教とラパイド実験のススメ
32bit Cortex Arduinoの布教とラパイド実験のススメ32bit Cortex Arduinoの布教とラパイド実験のススメ
32bit Cortex Arduinoの布教とラパイド実験のススメ
 
OS-2130D
OS-2130DOS-2130D
OS-2130D
 
Vimrc
VimrcVimrc
Vimrc
 
Ensamblar mi pc
Ensamblar mi pcEnsamblar mi pc
Ensamblar mi pc
 
Juniper MX80 Introduction
Juniper MX80 IntroductionJuniper MX80 Introduction
Juniper MX80 Introduction
 
RabbitMQ Server - cheat sheet -
RabbitMQ Server - cheat sheet -RabbitMQ Server - cheat sheet -
RabbitMQ Server - cheat sheet -
 
OpenBSD/sgi SMP implementation for Origin 350
OpenBSD/sgi SMP implementation for Origin 350OpenBSD/sgi SMP implementation for Origin 350
OpenBSD/sgi SMP implementation for Origin 350
 
Py drum
Py drumPy drum
Py drum
 

Similar to Kamery, światło, akcja!

Tft touch screen manufacturers
Tft touch screen manufacturersTft touch screen manufacturers
Tft touch screen manufacturers
KeatonParker2
 
IoT with openHAB on pcDuino3B
IoT with openHAB on pcDuino3BIoT with openHAB on pcDuino3B
IoT with openHAB on pcDuino3B
Jingfeng Liu
 
MEmento Final Presentation
MEmento Final PresentationMEmento Final Presentation
MEmento Final Presentation
GiovanniDeLuca20
 
Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 2/2
Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 2/2Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 2/2
Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 2/2
Bhavin Chandarana
 
Linux+sensor+device-tree+shell=IoT !
Linux+sensor+device-tree+shell=IoT !Linux+sensor+device-tree+shell=IoT !
Linux+sensor+device-tree+shell=IoT !
Dobrica Pavlinušić
 
MQTT - Austin IoT Meetup
MQTT - Austin IoT MeetupMQTT - Austin IoT Meetup
MQTT - Austin IoT Meetup
Bryan Boyd
 
Making things that works with us
Making things that works with usMaking things that works with us
Making things that works with us
Matteo Collina
 
Making things that works with us codemotion
Making things that works with us   codemotionMaking things that works with us   codemotion
Making things that works with us codemotion
Matteo Collina
 
Messaging for the Internet of Awesome Things
Messaging for the Internet of Awesome ThingsMessaging for the Internet of Awesome Things
Messaging for the Internet of Awesome Things
Andy Piper
 
Getting Started With Raspberry Pi - UCSD 2013
Getting Started With Raspberry Pi - UCSD 2013Getting Started With Raspberry Pi - UCSD 2013
Getting Started With Raspberry Pi - UCSD 2013Tom Paulus
 
Getting Started with Raspberry Pi - USC 2013
Getting Started with Raspberry Pi - USC 2013Getting Started with Raspberry Pi - USC 2013
Getting Started with Raspberry Pi - USC 2013
Tom Paulus
 
Micropython on MicroControllers
Micropython on MicroControllersMicropython on MicroControllers
Micropython on MicroControllers
Akshai M
 
Introducing MQTT
Introducing MQTTIntroducing MQTT
Introducing MQTTAndy Piper
 
Innovation with pcDuino
Innovation with pcDuinoInnovation with pcDuino
Innovation with pcDuino
Jingfeng Liu
 
Piccolo F2806x Microcontrollers
Piccolo F2806x MicrocontrollersPiccolo F2806x Microcontrollers
Piccolo F2806x Microcontrollers
Premier Farnell
 
IoT: Internet of Things with Python
IoT: Internet of Things with PythonIoT: Internet of Things with Python
IoT: Internet of Things with Python
Lelio Campanile
 
MQTT enabling the smallest things
MQTT enabling the smallest thingsMQTT enabling the smallest things
MQTT enabling the smallest things
Ian Craggs
 
Android 4.2 Internals - Bluetooth and Network
Android 4.2 Internals - Bluetooth and NetworkAndroid 4.2 Internals - Bluetooth and Network
Android 4.2 Internals - Bluetooth and Network
Caio Pereira
 
How to use an Arduino
How to use an ArduinoHow to use an Arduino
How to use an Arduino
AntonAndreev13
 

Similar to Kamery, światło, akcja! (20)

Tft touch screen manufacturers
Tft touch screen manufacturersTft touch screen manufacturers
Tft touch screen manufacturers
 
IoT with openHAB on pcDuino3B
IoT with openHAB on pcDuino3BIoT with openHAB on pcDuino3B
IoT with openHAB on pcDuino3B
 
MEmento Final Presentation
MEmento Final PresentationMEmento Final Presentation
MEmento Final Presentation
 
Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 2/2
Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 2/2Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 2/2
Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 2/2
 
Linux+sensor+device-tree+shell=IoT !
Linux+sensor+device-tree+shell=IoT !Linux+sensor+device-tree+shell=IoT !
Linux+sensor+device-tree+shell=IoT !
 
MQTT - Austin IoT Meetup
MQTT - Austin IoT MeetupMQTT - Austin IoT Meetup
MQTT - Austin IoT Meetup
 
Making things that works with us
Making things that works with usMaking things that works with us
Making things that works with us
 
Making things that works with us codemotion
Making things that works with us   codemotionMaking things that works with us   codemotion
Making things that works with us codemotion
 
Messaging for the Internet of Awesome Things
Messaging for the Internet of Awesome ThingsMessaging for the Internet of Awesome Things
Messaging for the Internet of Awesome Things
 
Getting Started With Raspberry Pi - UCSD 2013
Getting Started With Raspberry Pi - UCSD 2013Getting Started With Raspberry Pi - UCSD 2013
Getting Started With Raspberry Pi - UCSD 2013
 
Getting Started with Raspberry Pi - USC 2013
Getting Started with Raspberry Pi - USC 2013Getting Started with Raspberry Pi - USC 2013
Getting Started with Raspberry Pi - USC 2013
 
Micropython on MicroControllers
Micropython on MicroControllersMicropython on MicroControllers
Micropython on MicroControllers
 
IPC2 - Block Diagram
IPC2 - Block DiagramIPC2 - Block Diagram
IPC2 - Block Diagram
 
Introducing MQTT
Introducing MQTTIntroducing MQTT
Introducing MQTT
 
Innovation with pcDuino
Innovation with pcDuinoInnovation with pcDuino
Innovation with pcDuino
 
Piccolo F2806x Microcontrollers
Piccolo F2806x MicrocontrollersPiccolo F2806x Microcontrollers
Piccolo F2806x Microcontrollers
 
IoT: Internet of Things with Python
IoT: Internet of Things with PythonIoT: Internet of Things with Python
IoT: Internet of Things with Python
 
MQTT enabling the smallest things
MQTT enabling the smallest thingsMQTT enabling the smallest things
MQTT enabling the smallest things
 
Android 4.2 Internals - Bluetooth and Network
Android 4.2 Internals - Bluetooth and NetworkAndroid 4.2 Internals - Bluetooth and Network
Android 4.2 Internals - Bluetooth and Network
 
How to use an Arduino
How to use an ArduinoHow to use an Arduino
How to use an Arduino
 

Recently uploaded

Building a Raspberry Pi Robot with Dot NET 8, Blazor and SignalR - Slides Onl...
Building a Raspberry Pi Robot with Dot NET 8, Blazor and SignalR - Slides Onl...Building a Raspberry Pi Robot with Dot NET 8, Blazor and SignalR - Slides Onl...
Building a Raspberry Pi Robot with Dot NET 8, Blazor and SignalR - Slides Onl...
Peter Gallagher
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理
peuce
 
web-tech-lab-manual-final-abhas.pdf. Jer
web-tech-lab-manual-final-abhas.pdf. Jerweb-tech-lab-manual-final-abhas.pdf. Jer
web-tech-lab-manual-final-abhas.pdf. Jer
freshgammer09
 
MATHEMATICS BRIDGE COURSE (TEN DAYS PLANNER) (FOR CLASS XI STUDENTS GOING TO ...
MATHEMATICS BRIDGE COURSE (TEN DAYS PLANNER) (FOR CLASS XI STUDENTS GOING TO ...MATHEMATICS BRIDGE COURSE (TEN DAYS PLANNER) (FOR CLASS XI STUDENTS GOING TO ...
MATHEMATICS BRIDGE COURSE (TEN DAYS PLANNER) (FOR CLASS XI STUDENTS GOING TO ...
PinkySharma900491
 
欧洲杯冠军-欧洲杯冠军网站-欧洲杯冠军|【​网址​🎉ac123.net🎉​】领先全球的买球投注平台
欧洲杯冠军-欧洲杯冠军网站-欧洲杯冠军|【​网址​🎉ac123.net🎉​】领先全球的买球投注平台欧洲杯冠军-欧洲杯冠军网站-欧洲杯冠军|【​网址​🎉ac123.net🎉​】领先全球的买球投注平台
欧洲杯冠军-欧洲杯冠军网站-欧洲杯冠军|【​网址​🎉ac123.net🎉​】领先全球的买球投注平台
andreassenrolf537
 
一比一原版(UCSB毕业证)圣塔芭芭拉社区大学毕业证如何办理
一比一原版(UCSB毕业证)圣塔芭芭拉社区大学毕业证如何办理一比一原版(UCSB毕业证)圣塔芭芭拉社区大学毕业证如何办理
一比一原版(UCSB毕业证)圣塔芭芭拉社区大学毕业证如何办理
aozcue
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证如何办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证如何办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证如何办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证如何办理
aozcue
 

Recently uploaded (7)

Building a Raspberry Pi Robot with Dot NET 8, Blazor and SignalR - Slides Onl...
Building a Raspberry Pi Robot with Dot NET 8, Blazor and SignalR - Slides Onl...Building a Raspberry Pi Robot with Dot NET 8, Blazor and SignalR - Slides Onl...
Building a Raspberry Pi Robot with Dot NET 8, Blazor and SignalR - Slides Onl...
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证如何办理
 
web-tech-lab-manual-final-abhas.pdf. Jer
web-tech-lab-manual-final-abhas.pdf. Jerweb-tech-lab-manual-final-abhas.pdf. Jer
web-tech-lab-manual-final-abhas.pdf. Jer
 
MATHEMATICS BRIDGE COURSE (TEN DAYS PLANNER) (FOR CLASS XI STUDENTS GOING TO ...
MATHEMATICS BRIDGE COURSE (TEN DAYS PLANNER) (FOR CLASS XI STUDENTS GOING TO ...MATHEMATICS BRIDGE COURSE (TEN DAYS PLANNER) (FOR CLASS XI STUDENTS GOING TO ...
MATHEMATICS BRIDGE COURSE (TEN DAYS PLANNER) (FOR CLASS XI STUDENTS GOING TO ...
 
欧洲杯冠军-欧洲杯冠军网站-欧洲杯冠军|【​网址​🎉ac123.net🎉​】领先全球的买球投注平台
欧洲杯冠军-欧洲杯冠军网站-欧洲杯冠军|【​网址​🎉ac123.net🎉​】领先全球的买球投注平台欧洲杯冠军-欧洲杯冠军网站-欧洲杯冠军|【​网址​🎉ac123.net🎉​】领先全球的买球投注平台
欧洲杯冠军-欧洲杯冠军网站-欧洲杯冠军|【​网址​🎉ac123.net🎉​】领先全球的买球投注平台
 
一比一原版(UCSB毕业证)圣塔芭芭拉社区大学毕业证如何办理
一比一原版(UCSB毕业证)圣塔芭芭拉社区大学毕业证如何办理一比一原版(UCSB毕业证)圣塔芭芭拉社区大学毕业证如何办理
一比一原版(UCSB毕业证)圣塔芭芭拉社区大学毕业证如何办理
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证如何办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证如何办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证如何办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证如何办理
 

Kamery, światło, akcja!