SlideShare a Scribd company logo
Esp8266 Workshop
PROGRAM
• Theoretical
• What is the ESP8266
• Writing your own code
• Cool projects
• Considerations
• Practical
• Making something with the ESP8266
ABOUT ME
• Embedded enthusiast
• Don’t plug it in, take it apart!
• Personal projects
• LightSaga
• Ikea lamp
• Ambilight
• Blog on www.stijnvandrunen.nl
WHAT IS A ESP8266
• Wireless SoC
• Has GPIO, I2C, ADC, SPI, PWM and some other nice acronyms
• It’s fast! Running at 80MHz (or 160MHz if you’re brave)
• 64KBytes of instruction RAM, 96KBytes of data RAM and 64KBytes boot
ROM
• Has a Winbond W25Q40BVNIG SPI flash for your code
• RISC architecture (in case you care)
• Core is a 106micro Diamond Standard core (LX3) made by Tensilica
• ESP8266 chip is made by Espressif
• It’s cheap enough to be put in everything and anything
VARIANCES
NODEMCU
• An open source firmware aimed on the IoT platform. It has the ability to
run easy to code LUA scripts, making it easy to program the ESP8266.
Based on LUA 5.1.4 (without debug and os module). Build-in json, file,
timer, pwm, i2c, spi, 1-wire, net, mqtt, coap, gpio, wifi, adc, uart and
system api.
• Example of http server in using NodeMCU:
srv=net.createServer(net.TCP)
srv:listen(80,function(conn)
conn:on("receive",function(conn,payload)
print(payload)
conn:send("<h1> Hello, NodeMCU.</h1>”)
end)
end)
ARDUINO
• Starting with 1.6.4, Arduino allows installation of third-party platform
packages using Boards Manager.
• ESP8266 chip in the Arduino environment. ESP8266WiFi library bundled
with this project has the same interface as the WiFi Shield library,
making it easy to re-use existing code and libraries.
• Lot’s of libraries to benefit from for interfacing different hardware
components.
• More user friendly way of writing code, more examples available.
COMMUNITY
• Esp8266.com, very active community
• Support from Espressif, regular releases of SDKs (their latest is MIT
licensed)
• Google!
• Downsides
• Fragmented information.
• Chinese documents & quality
• Different versions
WRITING YOUR OWN CODE
• Get a SDK
• Linux
• ESP-open-sdk
• Windows
• Made by some Russian, supports Eclipse
• Look at samples
• Blinky
• Interrupt examples
• Your own project
• Flashing
BLINKY – INIT FUNCTION
//Init function
void ICACHE_FLASH_ATTR user_init() {
gpio_init(); // Initialize the GPIO subsystem.
PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO2_U, FUNC_GPIO2); // Set GPIO2 to
output mode
gpio_output_set(0, BIT2, BIT2, 0); // Set GPIO2 low
os_timer_disarm(&some_timer); // Disarm timer
os_timer_setfn(&some_timer, (os_timer_func_t *)some_timerfunc, NULL);
// Setup timer
os_timer_arm(&some_timer, 1000, 1); / /Arm the timer, 1000 is the fire
time in ms, 0 for once and 1 for repeating
system_os_task(user_procTask, user_procTaskPrio,user_procTaskQueue,
user_procTaskQueueLen); // Start os task
}
BLINKY – TIMER & OS FUNCTION
// Do blinky stuff
void some_timerfunc(void *arg) {
if (GPIO_REG_READ(GPIO_OUT_ADDRESS) & BIT2) { // Check if GPIO2 is
HIGH
gpio_output_set(0, BIT2, BIT2, 0); // Set GPIO2 to LOW
} else {
gpio_output_set(BIT2, 0, BIT2, 0); // Set GPIO2 to HIGH
}
}
//Do nothing function
static void ICACHE_FLASH_ATTR user_procTask(os_event_t *events) {
os_delay_us(10);
}
COOL PROJECTS
• MQTT
• Project running MQTT messaging on the ESP8266, very useful for IoT
applications such as reporting temperature and more.
• HTTP deamon
• Made by Sprite_TM (Dutch & GoT moderator), running a webserver on an
ESP to serve a site that allows control of GPIO.
• ESP8266 powerstrip
• Phoqus is playing with ESP8266s too, SAP wants to focus on IoT and
@jpenninkhof is making awesome things such as a ESP8266 controlled
powerstrip. Check it out on his website:
http://www.penninkhof.com/2015/05/linking-the-esp8266-a-raspberry-pi-
through-mqtt/
• Many more!!! Check esp8266.com or hackaday.com…
MQTT?
• MQTT (MQ Telemetry Transport) is a very simple, extremely efficient
publish/subscribe reliable messaging protocol. A protocol that enabled
devices to open a connection, keep it open using very little power and
receive events or commands with as little as 2 bytes of overhead. A
protocol that has the things built in that you need for reliable behavior
in an unreliable or intermittently connected wireless environments.
Things such as “last will & testament” so all apps know immediately if a
client disconnects ungracefully, “retained message” so any user re-
connecting immediately gets the very latest business information, etc.
CONSIDERATIONS
• ESP8266 is 3.3V, logic level converter needed for 5V hardware
• Antenna yields various results
• Chinese quality
• Pick the right ESP8266 for you
• Put code in flash
• Don’t give up!
HANDS-ON
• Driving WS2812b LED ring with ESP8266
• Connecting all the parts together
• Find a way to interface with the LEDs
• Control it! (Maybe esphttpd? Or simple UDP listener…)
• Please beware of the following points
• Check the polarity on your PSU
• Power and ground rails should be connected through in the middle
• Ground first, power later
• Logic level of WS2812b is 5V, ESP8266 is 3.3V
Ad

More Related Content

What's hot (19)

WiFi SoC ESP8266
WiFi SoC ESP8266WiFi SoC ESP8266
WiFi SoC ESP8266
Devesh Samaiya
 
Programming esp8266
Programming esp8266Programming esp8266
Programming esp8266
Baoshi Zhu
 
Node MCU Fun
Node MCU FunNode MCU Fun
Node MCU Fun
David Bosschaert
 
ESP8266 and IOT
ESP8266 and IOTESP8266 and IOT
ESP8266 and IOT
dega1999
 
Programando o ESP8266 com Python
Programando o ESP8266 com PythonProgramando o ESP8266 com Python
Programando o ESP8266 com Python
Relsi Maron
 
Esp8266 NodeMCU
Esp8266 NodeMCUEsp8266 NodeMCU
Esp8266 NodeMCU
roadster43
 
Arduino & NodeMcu
Arduino & NodeMcuArduino & NodeMcu
Arduino & NodeMcu
Guhan Ganesan
 
Nodemcu - introduction
Nodemcu - introductionNodemcu - introduction
Nodemcu - introduction
Michal Sedlak
 
Home automation-in-the-cloud-with-the-esp8266-and-adafruit-io
Home automation-in-the-cloud-with-the-esp8266-and-adafruit-ioHome automation-in-the-cloud-with-the-esp8266-and-adafruit-io
Home automation-in-the-cloud-with-the-esp8266-and-adafruit-io
Tran Minh Nhut
 
Esp8266 - Intro for dummies
Esp8266 - Intro for dummiesEsp8266 - Intro for dummies
Esp8266 - Intro for dummies
Pavlos Isaris
 
IoT Hands-On-Lab, KINGS, 2019
IoT Hands-On-Lab, KINGS, 2019IoT Hands-On-Lab, KINGS, 2019
IoT Hands-On-Lab, KINGS, 2019
Jong-Hyun Kim
 
Esp8266 basics
Esp8266 basicsEsp8266 basics
Esp8266 basics
Eueung Mulyana
 
lesson2 - Nodemcu course - NodeMCU dev Board
 lesson2 - Nodemcu course - NodeMCU dev Board lesson2 - Nodemcu course - NodeMCU dev Board
lesson2 - Nodemcu course - NodeMCU dev Board
Elaf A.Saeed
 
NodeMCU ESP8266 workshop 1
NodeMCU ESP8266 workshop 1NodeMCU ESP8266 workshop 1
NodeMCU ESP8266 workshop 1
Andy Gelme
 
Introduction to ESP32 Programming [Road to RIoT 2017]
Introduction to ESP32 Programming [Road to RIoT 2017]Introduction to ESP32 Programming [Road to RIoT 2017]
Introduction to ESP32 Programming [Road to RIoT 2017]
Alwin Arrasyid
 
How to Install ESP8266 WiFi Web Server using Arduino IDE
How to Install ESP8266 WiFi Web Server using Arduino IDEHow to Install ESP8266 WiFi Web Server using Arduino IDE
How to Install ESP8266 WiFi Web Server using Arduino IDE
Naoto MATSUMOTO
 
Cassiopeia Ltd - ESP8266+Arduino workshop
Cassiopeia Ltd - ESP8266+Arduino workshopCassiopeia Ltd - ESP8266+Arduino workshop
Cassiopeia Ltd - ESP8266+Arduino workshop
tomtobback
 
ESP8266 Wifi Nodemcu
ESP8266 Wifi Nodemcu ESP8266 Wifi Nodemcu
ESP8266 Wifi Nodemcu
creatjet3d labs
 
Arduino Meetup with Sonar and 433Mhz Radios
Arduino Meetup with Sonar and 433Mhz RadiosArduino Meetup with Sonar and 433Mhz Radios
Arduino Meetup with Sonar and 433Mhz Radios
roadster43
 
Programming esp8266
Programming esp8266Programming esp8266
Programming esp8266
Baoshi Zhu
 
ESP8266 and IOT
ESP8266 and IOTESP8266 and IOT
ESP8266 and IOT
dega1999
 
Programando o ESP8266 com Python
Programando o ESP8266 com PythonProgramando o ESP8266 com Python
Programando o ESP8266 com Python
Relsi Maron
 
Esp8266 NodeMCU
Esp8266 NodeMCUEsp8266 NodeMCU
Esp8266 NodeMCU
roadster43
 
Nodemcu - introduction
Nodemcu - introductionNodemcu - introduction
Nodemcu - introduction
Michal Sedlak
 
Home automation-in-the-cloud-with-the-esp8266-and-adafruit-io
Home automation-in-the-cloud-with-the-esp8266-and-adafruit-ioHome automation-in-the-cloud-with-the-esp8266-and-adafruit-io
Home automation-in-the-cloud-with-the-esp8266-and-adafruit-io
Tran Minh Nhut
 
Esp8266 - Intro for dummies
Esp8266 - Intro for dummiesEsp8266 - Intro for dummies
Esp8266 - Intro for dummies
Pavlos Isaris
 
IoT Hands-On-Lab, KINGS, 2019
IoT Hands-On-Lab, KINGS, 2019IoT Hands-On-Lab, KINGS, 2019
IoT Hands-On-Lab, KINGS, 2019
Jong-Hyun Kim
 
lesson2 - Nodemcu course - NodeMCU dev Board
 lesson2 - Nodemcu course - NodeMCU dev Board lesson2 - Nodemcu course - NodeMCU dev Board
lesson2 - Nodemcu course - NodeMCU dev Board
Elaf A.Saeed
 
NodeMCU ESP8266 workshop 1
NodeMCU ESP8266 workshop 1NodeMCU ESP8266 workshop 1
NodeMCU ESP8266 workshop 1
Andy Gelme
 
Introduction to ESP32 Programming [Road to RIoT 2017]
Introduction to ESP32 Programming [Road to RIoT 2017]Introduction to ESP32 Programming [Road to RIoT 2017]
Introduction to ESP32 Programming [Road to RIoT 2017]
Alwin Arrasyid
 
How to Install ESP8266 WiFi Web Server using Arduino IDE
How to Install ESP8266 WiFi Web Server using Arduino IDEHow to Install ESP8266 WiFi Web Server using Arduino IDE
How to Install ESP8266 WiFi Web Server using Arduino IDE
Naoto MATSUMOTO
 
Cassiopeia Ltd - ESP8266+Arduino workshop
Cassiopeia Ltd - ESP8266+Arduino workshopCassiopeia Ltd - ESP8266+Arduino workshop
Cassiopeia Ltd - ESP8266+Arduino workshop
tomtobback
 
Arduino Meetup with Sonar and 433Mhz Radios
Arduino Meetup with Sonar and 433Mhz RadiosArduino Meetup with Sonar and 433Mhz Radios
Arduino Meetup with Sonar and 433Mhz Radios
roadster43
 

Viewers also liked (12)

Arduino Lecture 1 - Introducing the Arduino
Arduino Lecture 1 - Introducing the ArduinoArduino Lecture 1 - Introducing the Arduino
Arduino Lecture 1 - Introducing the Arduino
Eoin Brazil
 
Introduction to arduino
Introduction to arduinoIntroduction to arduino
Introduction to arduino
Ahmed Sakr
 
Home Automation by ESP8266 #iotconfua
Home Automation by ESP8266 #iotconfuaHome Automation by ESP8266 #iotconfua
Home Automation by ESP8266 #iotconfua
Andy Shutka
 
ESP8266をはじめよう
ESP8266をはじめようESP8266をはじめよう
ESP8266をはじめよう
Kei Yoshimura
 
Arduino
ArduinoArduino
Arduino
vipin7vj
 
4. reading energy from piece fair energy meter by using esp8266
4. reading energy from piece fair energy meter by using esp82664. reading energy from piece fair energy meter by using esp8266
4. reading energy from piece fair energy meter by using esp8266
k srikanth
 
Nefryでiotカーテン作ってみた
Nefryでiotカーテン作ってみたNefryでiotカーテン作ってみた
Nefryでiotカーテン作ってみた
Tone Blue
 
Raspberry Pi
 Raspberry Pi  Raspberry Pi
Raspberry Pi
Aditya Khandate
 
Blynk.IoT #iotconfua
Blynk.IoT #iotconfuaBlynk.IoT #iotconfua
Blynk.IoT #iotconfua
Andy Shutka
 
Espresso Lite v2 - ESP8266 Overview
Espresso Lite v2 - ESP8266 OverviewEspresso Lite v2 - ESP8266 Overview
Espresso Lite v2 - ESP8266 Overview
The World Bank
 
Web x Arduino 智能監控潮潮 Der
Web x Arduino 智能監控潮潮 DerWeb x Arduino 智能監控潮潮 Der
Web x Arduino 智能監控潮潮 Der
Web Arduino
 
MQTT – protocol for yours IoT
MQTT – protocol for yours IoTMQTT – protocol for yours IoT
MQTT – protocol for yours IoT
Miroslav Resetar
 
Arduino Lecture 1 - Introducing the Arduino
Arduino Lecture 1 - Introducing the ArduinoArduino Lecture 1 - Introducing the Arduino
Arduino Lecture 1 - Introducing the Arduino
Eoin Brazil
 
Introduction to arduino
Introduction to arduinoIntroduction to arduino
Introduction to arduino
Ahmed Sakr
 
Home Automation by ESP8266 #iotconfua
Home Automation by ESP8266 #iotconfuaHome Automation by ESP8266 #iotconfua
Home Automation by ESP8266 #iotconfua
Andy Shutka
 
ESP8266をはじめよう
ESP8266をはじめようESP8266をはじめよう
ESP8266をはじめよう
Kei Yoshimura
 
4. reading energy from piece fair energy meter by using esp8266
4. reading energy from piece fair energy meter by using esp82664. reading energy from piece fair energy meter by using esp8266
4. reading energy from piece fair energy meter by using esp8266
k srikanth
 
Nefryでiotカーテン作ってみた
Nefryでiotカーテン作ってみたNefryでiotカーテン作ってみた
Nefryでiotカーテン作ってみた
Tone Blue
 
Blynk.IoT #iotconfua
Blynk.IoT #iotconfuaBlynk.IoT #iotconfua
Blynk.IoT #iotconfua
Andy Shutka
 
Espresso Lite v2 - ESP8266 Overview
Espresso Lite v2 - ESP8266 OverviewEspresso Lite v2 - ESP8266 Overview
Espresso Lite v2 - ESP8266 Overview
The World Bank
 
Web x Arduino 智能監控潮潮 Der
Web x Arduino 智能監控潮潮 DerWeb x Arduino 智能監控潮潮 Der
Web x Arduino 智能監控潮潮 Der
Web Arduino
 
MQTT – protocol for yours IoT
MQTT – protocol for yours IoTMQTT – protocol for yours IoT
MQTT – protocol for yours IoT
Miroslav Resetar
 
Ad

Similar to Esp8266 Workshop (20)

Iot Bootcamp - abridged - part 1
Iot Bootcamp - abridged - part 1Iot Bootcamp - abridged - part 1
Iot Bootcamp - abridged - part 1
Marcus Tarquinio
 
IoT Intro and Demo
IoT Intro and DemoIoT Intro and Demo
IoT Intro and Demo
Albert Suwandhi
 
Qiscus bot esp8266
Qiscus bot esp8266Qiscus bot esp8266
Qiscus bot esp8266
Ashari Juang
 
Introduction to FreeRTOS
Introduction to FreeRTOSIntroduction to FreeRTOS
Introduction to FreeRTOS
ICS
 
Taller IoT en la Actualidad
Taller IoT en la ActualidadTaller IoT en la Actualidad
Taller IoT en la Actualidad
Laurence HR
 
Eclipse Plugin for ESP-IDF - EclipseCon Europe 2019
Eclipse Plugin for ESP-IDF -  EclipseCon Europe 2019Eclipse Plugin for ESP-IDF -  EclipseCon Europe 2019
Eclipse Plugin for ESP-IDF - EclipseCon Europe 2019
Kondal Kolipaka
 
embedded-systems-for-beginners
embedded-systems-for-beginnersembedded-systems-for-beginners
embedded-systems-for-beginners
mohamed gaber
 
Edje Project: The Software Foundation for IoT Devices
Edje Project: The Software Foundation for IoT DevicesEdje Project: The Software Foundation for IoT Devices
Edje Project: The Software Foundation for IoT Devices
MicroEJ
 
Null mumbai-iot-workshop
Null mumbai-iot-workshopNull mumbai-iot-workshop
Null mumbai-iot-workshop
Nitesh Malviya
 
Practical Introduction to Internet of Things (IoT)
Practical Introduction to Internet of Things (IoT)Practical Introduction to Internet of Things (IoT)
Practical Introduction to Internet of Things (IoT)
Suraj Kumar Jana
 
IDF_Eclipse_Plugin_EclipseCon2020_v2.pdf
IDF_Eclipse_Plugin_EclipseCon2020_v2.pdfIDF_Eclipse_Plugin_EclipseCon2020_v2.pdf
IDF_Eclipse_Plugin_EclipseCon2020_v2.pdf
Kondal Kolipaka
 
R0boCamp2016 Гліб Вінніков Home automation by ESP8266
R0boCamp2016  Гліб Вінніков  Home automation by ESP8266R0boCamp2016  Гліб Вінніков  Home automation by ESP8266
R0boCamp2016 Гліб Вінніков Home automation by ESP8266
Lviv Startup Club
 
Quick prototyping using Gadgeteer, Raspberry Pi + Fez Cream
Quick prototyping using Gadgeteer, Raspberry Pi + Fez CreamQuick prototyping using Gadgeteer, Raspberry Pi + Fez Cream
Quick prototyping using Gadgeteer, Raspberry Pi + Fez Cream
Mif Masterz
 
[MakerHN] [IoT] [01] Intro 2
[MakerHN] [IoT] [01] Intro 2[MakerHN] [IoT] [01] Intro 2
[MakerHN] [IoT] [01] Intro 2
Công Hoàng Văn
 
Rapid IoT prototyping with mruby
Rapid IoT prototyping with mrubyRapid IoT prototyping with mruby
Rapid IoT prototyping with mruby
雅也 山本
 
SFScon 22 - Roberto Innocenti - Start Enjoy Yourself with Open Hardware POWER...
SFScon 22 - Roberto Innocenti - Start Enjoy Yourself with Open Hardware POWER...SFScon 22 - Roberto Innocenti - Start Enjoy Yourself with Open Hardware POWER...
SFScon 22 - Roberto Innocenti - Start Enjoy Yourself with Open Hardware POWER...
South Tyrol Free Software Conference
 
ESP32 WiFi & Bluetooth Module - Getting Started Guide
ESP32 WiFi & Bluetooth Module - Getting Started GuideESP32 WiFi & Bluetooth Module - Getting Started Guide
ESP32 WiFi & Bluetooth Module - Getting Started Guide
handson28
 
Internet of Things prescribed by University
Internet of Things prescribed by UniversityInternet of Things prescribed by University
Internet of Things prescribed by University
Sanjay Kumar
 
Remote tanklevelmonitor
Remote tanklevelmonitorRemote tanklevelmonitor
Remote tanklevelmonitor
Parshwadeep Lahane
 
Advanced SOHO Router Exploitation XCON
Advanced SOHO Router Exploitation XCONAdvanced SOHO Router Exploitation XCON
Advanced SOHO Router Exploitation XCON
Lyon Yang
 
Iot Bootcamp - abridged - part 1
Iot Bootcamp - abridged - part 1Iot Bootcamp - abridged - part 1
Iot Bootcamp - abridged - part 1
Marcus Tarquinio
 
Qiscus bot esp8266
Qiscus bot esp8266Qiscus bot esp8266
Qiscus bot esp8266
Ashari Juang
 
Introduction to FreeRTOS
Introduction to FreeRTOSIntroduction to FreeRTOS
Introduction to FreeRTOS
ICS
 
Taller IoT en la Actualidad
Taller IoT en la ActualidadTaller IoT en la Actualidad
Taller IoT en la Actualidad
Laurence HR
 
Eclipse Plugin for ESP-IDF - EclipseCon Europe 2019
Eclipse Plugin for ESP-IDF -  EclipseCon Europe 2019Eclipse Plugin for ESP-IDF -  EclipseCon Europe 2019
Eclipse Plugin for ESP-IDF - EclipseCon Europe 2019
Kondal Kolipaka
 
embedded-systems-for-beginners
embedded-systems-for-beginnersembedded-systems-for-beginners
embedded-systems-for-beginners
mohamed gaber
 
Edje Project: The Software Foundation for IoT Devices
Edje Project: The Software Foundation for IoT DevicesEdje Project: The Software Foundation for IoT Devices
Edje Project: The Software Foundation for IoT Devices
MicroEJ
 
Null mumbai-iot-workshop
Null mumbai-iot-workshopNull mumbai-iot-workshop
Null mumbai-iot-workshop
Nitesh Malviya
 
Practical Introduction to Internet of Things (IoT)
Practical Introduction to Internet of Things (IoT)Practical Introduction to Internet of Things (IoT)
Practical Introduction to Internet of Things (IoT)
Suraj Kumar Jana
 
IDF_Eclipse_Plugin_EclipseCon2020_v2.pdf
IDF_Eclipse_Plugin_EclipseCon2020_v2.pdfIDF_Eclipse_Plugin_EclipseCon2020_v2.pdf
IDF_Eclipse_Plugin_EclipseCon2020_v2.pdf
Kondal Kolipaka
 
R0boCamp2016 Гліб Вінніков Home automation by ESP8266
R0boCamp2016  Гліб Вінніков  Home automation by ESP8266R0boCamp2016  Гліб Вінніков  Home automation by ESP8266
R0boCamp2016 Гліб Вінніков Home automation by ESP8266
Lviv Startup Club
 
Quick prototyping using Gadgeteer, Raspberry Pi + Fez Cream
Quick prototyping using Gadgeteer, Raspberry Pi + Fez CreamQuick prototyping using Gadgeteer, Raspberry Pi + Fez Cream
Quick prototyping using Gadgeteer, Raspberry Pi + Fez Cream
Mif Masterz
 
[MakerHN] [IoT] [01] Intro 2
[MakerHN] [IoT] [01] Intro 2[MakerHN] [IoT] [01] Intro 2
[MakerHN] [IoT] [01] Intro 2
Công Hoàng Văn
 
Rapid IoT prototyping with mruby
Rapid IoT prototyping with mrubyRapid IoT prototyping with mruby
Rapid IoT prototyping with mruby
雅也 山本
 
SFScon 22 - Roberto Innocenti - Start Enjoy Yourself with Open Hardware POWER...
SFScon 22 - Roberto Innocenti - Start Enjoy Yourself with Open Hardware POWER...SFScon 22 - Roberto Innocenti - Start Enjoy Yourself with Open Hardware POWER...
SFScon 22 - Roberto Innocenti - Start Enjoy Yourself with Open Hardware POWER...
South Tyrol Free Software Conference
 
ESP32 WiFi & Bluetooth Module - Getting Started Guide
ESP32 WiFi & Bluetooth Module - Getting Started GuideESP32 WiFi & Bluetooth Module - Getting Started Guide
ESP32 WiFi & Bluetooth Module - Getting Started Guide
handson28
 
Internet of Things prescribed by University
Internet of Things prescribed by UniversityInternet of Things prescribed by University
Internet of Things prescribed by University
Sanjay Kumar
 
Advanced SOHO Router Exploitation XCON
Advanced SOHO Router Exploitation XCONAdvanced SOHO Router Exploitation XCON
Advanced SOHO Router Exploitation XCON
Lyon Yang
 
Ad

Recently uploaded (20)

Introduction to FLUID MECHANICS & KINEMATICS
Introduction to FLUID MECHANICS &  KINEMATICSIntroduction to FLUID MECHANICS &  KINEMATICS
Introduction to FLUID MECHANICS & KINEMATICS
narayanaswamygdas
 
Design of Variable Depth Single-Span Post.pdf
Design of Variable Depth Single-Span Post.pdfDesign of Variable Depth Single-Span Post.pdf
Design of Variable Depth Single-Span Post.pdf
Kamel Farid
 
Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...
Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...
Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...
Journal of Soft Computing in Civil Engineering
 
Comprehensive-Event-Management-System.pptx
Comprehensive-Event-Management-System.pptxComprehensive-Event-Management-System.pptx
Comprehensive-Event-Management-System.pptx
dd7devdilip
 
Machine Learning basics POWERPOINT PRESENETATION
Machine Learning basics POWERPOINT PRESENETATIONMachine Learning basics POWERPOINT PRESENETATION
Machine Learning basics POWERPOINT PRESENETATION
DarrinBright1
 
Nanometer Metal-Organic-Framework Literature Comparison
Nanometer Metal-Organic-Framework  Literature ComparisonNanometer Metal-Organic-Framework  Literature Comparison
Nanometer Metal-Organic-Framework Literature Comparison
Chris Harding
 
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G..."Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
Infopitaara
 
ISO 9001 quality management systemPPT.pptx
ISO 9001 quality management systemPPT.pptxISO 9001 quality management systemPPT.pptx
ISO 9001 quality management systemPPT.pptx
mesfin608
 
Routing Riverdale - A New Bus Connection
Routing Riverdale - A New Bus ConnectionRouting Riverdale - A New Bus Connection
Routing Riverdale - A New Bus Connection
jzb7232
 
How to Buy Snapchat Account A Step-by-Step Guide.pdf
How to Buy Snapchat Account A Step-by-Step Guide.pdfHow to Buy Snapchat Account A Step-by-Step Guide.pdf
How to Buy Snapchat Account A Step-by-Step Guide.pdf
jamedlimmk
 
Main cotrol jdbjbdcnxbjbjzjjjcjicbjxbcjcxbjcxb
Main cotrol jdbjbdcnxbjbjzjjjcjicbjxbcjcxbjcxbMain cotrol jdbjbdcnxbjbjzjjjcjicbjxbcjcxbjcxb
Main cotrol jdbjbdcnxbjbjzjjjcjicbjxbcjcxbjcxb
SunilSingh610661
 
Efficient Algorithms for Isogeny Computation on Hyperelliptic Curves: Their A...
Efficient Algorithms for Isogeny Computation on Hyperelliptic Curves: Their A...Efficient Algorithms for Isogeny Computation on Hyperelliptic Curves: Their A...
Efficient Algorithms for Isogeny Computation on Hyperelliptic Curves: Their A...
IJCNCJournal
 
SICPA: Fabien Keller - background introduction
SICPA: Fabien Keller - background introductionSICPA: Fabien Keller - background introduction
SICPA: Fabien Keller - background introduction
fabienklr
 
Reese McCrary_ The Role of Perseverance in Engineering Success.pdf
Reese McCrary_ The Role of Perseverance in Engineering Success.pdfReese McCrary_ The Role of Perseverance in Engineering Success.pdf
Reese McCrary_ The Role of Perseverance in Engineering Success.pdf
Reese McCrary
 
twin tower attack 2001 new york city
twin  tower  attack  2001 new  york citytwin  tower  attack  2001 new  york city
twin tower attack 2001 new york city
harishreemavs
 
Surveying through global positioning system
Surveying through global positioning systemSurveying through global positioning system
Surveying through global positioning system
opneptune5
 
Novel Plug Flow Reactor with Recycle For Growth Control
Novel Plug Flow Reactor with Recycle For Growth ControlNovel Plug Flow Reactor with Recycle For Growth Control
Novel Plug Flow Reactor with Recycle For Growth Control
Chris Harding
 
Compiler Design_Code generation techniques.pptx
Compiler Design_Code generation techniques.pptxCompiler Design_Code generation techniques.pptx
Compiler Design_Code generation techniques.pptx
RushaliDeshmukh2
 
Autodesk Fusion 2025 Tutorial: User Interface
Autodesk Fusion 2025 Tutorial: User InterfaceAutodesk Fusion 2025 Tutorial: User Interface
Autodesk Fusion 2025 Tutorial: User Interface
Atif Razi
 
COMPUTER GRAPHICS AND VISUALIZATION :MODULE-1 notes [BCG402-CG&V].pdf
COMPUTER GRAPHICS AND VISUALIZATION :MODULE-1 notes [BCG402-CG&V].pdfCOMPUTER GRAPHICS AND VISUALIZATION :MODULE-1 notes [BCG402-CG&V].pdf
COMPUTER GRAPHICS AND VISUALIZATION :MODULE-1 notes [BCG402-CG&V].pdf
Alvas Institute of Engineering and technology, Moodabidri
 
Introduction to FLUID MECHANICS & KINEMATICS
Introduction to FLUID MECHANICS &  KINEMATICSIntroduction to FLUID MECHANICS &  KINEMATICS
Introduction to FLUID MECHANICS & KINEMATICS
narayanaswamygdas
 
Design of Variable Depth Single-Span Post.pdf
Design of Variable Depth Single-Span Post.pdfDesign of Variable Depth Single-Span Post.pdf
Design of Variable Depth Single-Span Post.pdf
Kamel Farid
 
Comprehensive-Event-Management-System.pptx
Comprehensive-Event-Management-System.pptxComprehensive-Event-Management-System.pptx
Comprehensive-Event-Management-System.pptx
dd7devdilip
 
Machine Learning basics POWERPOINT PRESENETATION
Machine Learning basics POWERPOINT PRESENETATIONMachine Learning basics POWERPOINT PRESENETATION
Machine Learning basics POWERPOINT PRESENETATION
DarrinBright1
 
Nanometer Metal-Organic-Framework Literature Comparison
Nanometer Metal-Organic-Framework  Literature ComparisonNanometer Metal-Organic-Framework  Literature Comparison
Nanometer Metal-Organic-Framework Literature Comparison
Chris Harding
 
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G..."Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
Infopitaara
 
ISO 9001 quality management systemPPT.pptx
ISO 9001 quality management systemPPT.pptxISO 9001 quality management systemPPT.pptx
ISO 9001 quality management systemPPT.pptx
mesfin608
 
Routing Riverdale - A New Bus Connection
Routing Riverdale - A New Bus ConnectionRouting Riverdale - A New Bus Connection
Routing Riverdale - A New Bus Connection
jzb7232
 
How to Buy Snapchat Account A Step-by-Step Guide.pdf
How to Buy Snapchat Account A Step-by-Step Guide.pdfHow to Buy Snapchat Account A Step-by-Step Guide.pdf
How to Buy Snapchat Account A Step-by-Step Guide.pdf
jamedlimmk
 
Main cotrol jdbjbdcnxbjbjzjjjcjicbjxbcjcxbjcxb
Main cotrol jdbjbdcnxbjbjzjjjcjicbjxbcjcxbjcxbMain cotrol jdbjbdcnxbjbjzjjjcjicbjxbcjcxbjcxb
Main cotrol jdbjbdcnxbjbjzjjjcjicbjxbcjcxbjcxb
SunilSingh610661
 
Efficient Algorithms for Isogeny Computation on Hyperelliptic Curves: Their A...
Efficient Algorithms for Isogeny Computation on Hyperelliptic Curves: Their A...Efficient Algorithms for Isogeny Computation on Hyperelliptic Curves: Their A...
Efficient Algorithms for Isogeny Computation on Hyperelliptic Curves: Their A...
IJCNCJournal
 
SICPA: Fabien Keller - background introduction
SICPA: Fabien Keller - background introductionSICPA: Fabien Keller - background introduction
SICPA: Fabien Keller - background introduction
fabienklr
 
Reese McCrary_ The Role of Perseverance in Engineering Success.pdf
Reese McCrary_ The Role of Perseverance in Engineering Success.pdfReese McCrary_ The Role of Perseverance in Engineering Success.pdf
Reese McCrary_ The Role of Perseverance in Engineering Success.pdf
Reese McCrary
 
twin tower attack 2001 new york city
twin  tower  attack  2001 new  york citytwin  tower  attack  2001 new  york city
twin tower attack 2001 new york city
harishreemavs
 
Surveying through global positioning system
Surveying through global positioning systemSurveying through global positioning system
Surveying through global positioning system
opneptune5
 
Novel Plug Flow Reactor with Recycle For Growth Control
Novel Plug Flow Reactor with Recycle For Growth ControlNovel Plug Flow Reactor with Recycle For Growth Control
Novel Plug Flow Reactor with Recycle For Growth Control
Chris Harding
 
Compiler Design_Code generation techniques.pptx
Compiler Design_Code generation techniques.pptxCompiler Design_Code generation techniques.pptx
Compiler Design_Code generation techniques.pptx
RushaliDeshmukh2
 
Autodesk Fusion 2025 Tutorial: User Interface
Autodesk Fusion 2025 Tutorial: User InterfaceAutodesk Fusion 2025 Tutorial: User Interface
Autodesk Fusion 2025 Tutorial: User Interface
Atif Razi
 

Esp8266 Workshop

  • 2. PROGRAM • Theoretical • What is the ESP8266 • Writing your own code • Cool projects • Considerations • Practical • Making something with the ESP8266
  • 3. ABOUT ME • Embedded enthusiast • Don’t plug it in, take it apart! • Personal projects • LightSaga • Ikea lamp • Ambilight • Blog on www.stijnvandrunen.nl
  • 4. WHAT IS A ESP8266 • Wireless SoC • Has GPIO, I2C, ADC, SPI, PWM and some other nice acronyms • It’s fast! Running at 80MHz (or 160MHz if you’re brave) • 64KBytes of instruction RAM, 96KBytes of data RAM and 64KBytes boot ROM • Has a Winbond W25Q40BVNIG SPI flash for your code • RISC architecture (in case you care) • Core is a 106micro Diamond Standard core (LX3) made by Tensilica • ESP8266 chip is made by Espressif • It’s cheap enough to be put in everything and anything
  • 6. NODEMCU • An open source firmware aimed on the IoT platform. It has the ability to run easy to code LUA scripts, making it easy to program the ESP8266. Based on LUA 5.1.4 (without debug and os module). Build-in json, file, timer, pwm, i2c, spi, 1-wire, net, mqtt, coap, gpio, wifi, adc, uart and system api. • Example of http server in using NodeMCU: srv=net.createServer(net.TCP) srv:listen(80,function(conn) conn:on("receive",function(conn,payload) print(payload) conn:send("<h1> Hello, NodeMCU.</h1>”) end) end)
  • 7. ARDUINO • Starting with 1.6.4, Arduino allows installation of third-party platform packages using Boards Manager. • ESP8266 chip in the Arduino environment. ESP8266WiFi library bundled with this project has the same interface as the WiFi Shield library, making it easy to re-use existing code and libraries. • Lot’s of libraries to benefit from for interfacing different hardware components. • More user friendly way of writing code, more examples available.
  • 8. COMMUNITY • Esp8266.com, very active community • Support from Espressif, regular releases of SDKs (their latest is MIT licensed) • Google! • Downsides • Fragmented information. • Chinese documents & quality • Different versions
  • 9. WRITING YOUR OWN CODE • Get a SDK • Linux • ESP-open-sdk • Windows • Made by some Russian, supports Eclipse • Look at samples • Blinky • Interrupt examples • Your own project • Flashing
  • 10. BLINKY – INIT FUNCTION //Init function void ICACHE_FLASH_ATTR user_init() { gpio_init(); // Initialize the GPIO subsystem. PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO2_U, FUNC_GPIO2); // Set GPIO2 to output mode gpio_output_set(0, BIT2, BIT2, 0); // Set GPIO2 low os_timer_disarm(&some_timer); // Disarm timer os_timer_setfn(&some_timer, (os_timer_func_t *)some_timerfunc, NULL); // Setup timer os_timer_arm(&some_timer, 1000, 1); / /Arm the timer, 1000 is the fire time in ms, 0 for once and 1 for repeating system_os_task(user_procTask, user_procTaskPrio,user_procTaskQueue, user_procTaskQueueLen); // Start os task }
  • 11. BLINKY – TIMER & OS FUNCTION // Do blinky stuff void some_timerfunc(void *arg) { if (GPIO_REG_READ(GPIO_OUT_ADDRESS) & BIT2) { // Check if GPIO2 is HIGH gpio_output_set(0, BIT2, BIT2, 0); // Set GPIO2 to LOW } else { gpio_output_set(BIT2, 0, BIT2, 0); // Set GPIO2 to HIGH } } //Do nothing function static void ICACHE_FLASH_ATTR user_procTask(os_event_t *events) { os_delay_us(10); }
  • 12. COOL PROJECTS • MQTT • Project running MQTT messaging on the ESP8266, very useful for IoT applications such as reporting temperature and more. • HTTP deamon • Made by Sprite_TM (Dutch & GoT moderator), running a webserver on an ESP to serve a site that allows control of GPIO. • ESP8266 powerstrip • Phoqus is playing with ESP8266s too, SAP wants to focus on IoT and @jpenninkhof is making awesome things such as a ESP8266 controlled powerstrip. Check it out on his website: http://www.penninkhof.com/2015/05/linking-the-esp8266-a-raspberry-pi- through-mqtt/ • Many more!!! Check esp8266.com or hackaday.com…
  • 13. MQTT? • MQTT (MQ Telemetry Transport) is a very simple, extremely efficient publish/subscribe reliable messaging protocol. A protocol that enabled devices to open a connection, keep it open using very little power and receive events or commands with as little as 2 bytes of overhead. A protocol that has the things built in that you need for reliable behavior in an unreliable or intermittently connected wireless environments. Things such as “last will & testament” so all apps know immediately if a client disconnects ungracefully, “retained message” so any user re- connecting immediately gets the very latest business information, etc.
  • 14. CONSIDERATIONS • ESP8266 is 3.3V, logic level converter needed for 5V hardware • Antenna yields various results • Chinese quality • Pick the right ESP8266 for you • Put code in flash • Don’t give up!
  • 15. HANDS-ON • Driving WS2812b LED ring with ESP8266 • Connecting all the parts together • Find a way to interface with the LEDs • Control it! (Maybe esphttpd? Or simple UDP listener…) • Please beware of the following points • Check the polarity on your PSU • Power and ground rails should be connected through in the middle • Ground first, power later • Logic level of WS2812b is 5V, ESP8266 is 3.3V