SlideShare a Scribd company logo
1 of 67
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

Asus WL500gP USB Serial
Asus WL500gP USB SerialAsus WL500gP USB Serial
Asus WL500gP USB Serial
guestac21b8
 
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
Takuya ASADA
 

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!

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
Tom Paulus
 
Introducing MQTT
Introducing MQTTIntroducing MQTT
Introducing MQTT
Andy Piper
 

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

一比一定(购)国立南方理工学院毕业证(Southern毕业证)成绩单学位证
一比一定(购)国立南方理工学院毕业证(Southern毕业证)成绩单学位证一比一定(购)国立南方理工学院毕业证(Southern毕业证)成绩单学位证
一比一定(购)国立南方理工学院毕业证(Southern毕业证)成绩单学位证
wpkuukw
 
Buy Abortion pills in Riyadh |+966572737505 | Get Cytotec
Buy Abortion pills in Riyadh |+966572737505 | Get CytotecBuy Abortion pills in Riyadh |+966572737505 | Get Cytotec
Buy Abortion pills in Riyadh |+966572737505 | Get Cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
Abortion pills in Jeddah |+966572737505 | Get Cytotec
Abortion pills in Jeddah |+966572737505 | Get CytotecAbortion pills in Jeddah |+966572737505 | Get Cytotec
Abortion pills in Jeddah |+966572737505 | Get Cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
In Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pills
In Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pillsIn Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pills
In Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pills
Abortion pills in Riyadh +966572737505 get cytotec
 
怎样办理伍伦贡大学毕业证(UOW毕业证书)成绩单留信认证
怎样办理伍伦贡大学毕业证(UOW毕业证书)成绩单留信认证怎样办理伍伦贡大学毕业证(UOW毕业证书)成绩单留信认证
怎样办理伍伦贡大学毕业证(UOW毕业证书)成绩单留信认证
ehyxf
 
CRISIS COMMUNICATION presentation=-Rishabh(11195)-group ppt (4).pptx
CRISIS COMMUNICATION presentation=-Rishabh(11195)-group ppt (4).pptxCRISIS COMMUNICATION presentation=-Rishabh(11195)-group ppt (4).pptx
CRISIS COMMUNICATION presentation=-Rishabh(11195)-group ppt (4).pptx
Rishabh332761
 
一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证
一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证
一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证
wpkuukw
 
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
tufbav
 
Top profile Call Girls In Udgir [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Udgir [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Udgir [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Udgir [ 7014168258 ] Call Me For Genuine Models We ...
gajnagarg
 
在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一
在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一
在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一
uodye
 
在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一
在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一
在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一
ougvy
 
一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理
一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理
一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理
uodye
 
一比一原版(CSUEB毕业证书)东湾分校毕业证原件一模一样
一比一原版(CSUEB毕业证书)东湾分校毕业证原件一模一样一比一原版(CSUEB毕业证书)东湾分校毕业证原件一模一样
一比一原版(CSUEB毕业证书)东湾分校毕业证原件一模一样
ayoqf
 
Top profile Call Girls In Ratlam [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Ratlam [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Ratlam [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Ratlam [ 7014168258 ] Call Me For Genuine Models We...
nirzagarg
 
一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理
一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理
一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理
uodye
 

Recently uploaded (20)

LANDSLIDE MONITORING AND ALERT SYSTEM FINAL YEAR PROJECT BROCHURE
LANDSLIDE MONITORING AND ALERT SYSTEM FINAL YEAR PROJECT BROCHURELANDSLIDE MONITORING AND ALERT SYSTEM FINAL YEAR PROJECT BROCHURE
LANDSLIDE MONITORING AND ALERT SYSTEM FINAL YEAR PROJECT BROCHURE
 
一比一定(购)国立南方理工学院毕业证(Southern毕业证)成绩单学位证
一比一定(购)国立南方理工学院毕业证(Southern毕业证)成绩单学位证一比一定(购)国立南方理工学院毕业证(Southern毕业证)成绩单学位证
一比一定(购)国立南方理工学院毕业证(Southern毕业证)成绩单学位证
 
Buy Abortion pills in Riyadh |+966572737505 | Get Cytotec
Buy Abortion pills in Riyadh |+966572737505 | Get CytotecBuy Abortion pills in Riyadh |+966572737505 | Get Cytotec
Buy Abortion pills in Riyadh |+966572737505 | Get Cytotec
 
Critical Commentary Social Work Ethics.pptx
Critical Commentary Social Work Ethics.pptxCritical Commentary Social Work Ethics.pptx
Critical Commentary Social Work Ethics.pptx
 
Abortion pills in Jeddah |+966572737505 | Get Cytotec
Abortion pills in Jeddah |+966572737505 | Get CytotecAbortion pills in Jeddah |+966572737505 | Get Cytotec
Abortion pills in Jeddah |+966572737505 | Get Cytotec
 
In Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pills
In Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pillsIn Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pills
In Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pills
 
Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...
Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...
Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...
 
怎样办理伍伦贡大学毕业证(UOW毕业证书)成绩单留信认证
怎样办理伍伦贡大学毕业证(UOW毕业证书)成绩单留信认证怎样办理伍伦贡大学毕业证(UOW毕业证书)成绩单留信认证
怎样办理伍伦贡大学毕业证(UOW毕业证书)成绩单留信认证
 
CRISIS COMMUNICATION presentation=-Rishabh(11195)-group ppt (4).pptx
CRISIS COMMUNICATION presentation=-Rishabh(11195)-group ppt (4).pptxCRISIS COMMUNICATION presentation=-Rishabh(11195)-group ppt (4).pptx
CRISIS COMMUNICATION presentation=-Rishabh(11195)-group ppt (4).pptx
 
一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证
一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证
一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证
 
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
 
Top profile Call Girls In Udgir [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Udgir [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Udgir [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Udgir [ 7014168258 ] Call Me For Genuine Models We ...
 
在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一
在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一
在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一
 
在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一
在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一
在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一
 
一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理
一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理
一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理
 
一比一原版(CSUEB毕业证书)东湾分校毕业证原件一模一样
一比一原版(CSUEB毕业证书)东湾分校毕业证原件一模一样一比一原版(CSUEB毕业证书)东湾分校毕业证原件一模一样
一比一原版(CSUEB毕业证书)东湾分校毕业证原件一模一样
 
Call Girls Amethi 9332606886 HOT & SEXY Models beautiful and charming call g...
Call Girls Amethi  9332606886 HOT & SEXY Models beautiful and charming call g...Call Girls Amethi  9332606886 HOT & SEXY Models beautiful and charming call g...
Call Girls Amethi 9332606886 HOT & SEXY Models beautiful and charming call g...
 
Guwahati Escorts Service Girl ^ 9332606886, WhatsApp Anytime Guwahati
Guwahati Escorts Service Girl ^ 9332606886, WhatsApp Anytime GuwahatiGuwahati Escorts Service Girl ^ 9332606886, WhatsApp Anytime Guwahati
Guwahati Escorts Service Girl ^ 9332606886, WhatsApp Anytime Guwahati
 
Top profile Call Girls In Ratlam [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Ratlam [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Ratlam [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Ratlam [ 7014168258 ] Call Me For Genuine Models We...
 
一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理
一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理
一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理
 

Kamery, światło, akcja!