SlideShare a Scribd company logo
Internet of Things for Dummies
Week 1
$ whoami
Ha Trung Hieu aka Harry Ha
hieuht@0x1115.org
@makerhanoi
@2016, September 24
IoT devices combine
hardware and software
- Hardware interacts with the world
- Software takes the is the data received
from the hardware and It is“Intelligence”
Outline;
1. How to read a schematic
2. How to use a Breadboard
3. ESP8266 NodeMCU
4. Setup development environment
5. Example
6. More
1. How to read
a schematic
Basic schematic symbols for various components
Resistors
Potentiometers and Variable Resistors
Resistors
● Provides resistance to current flow
● Two terminals, not difference between them
● Band colors indicate resistor size
– Each color is a digit; scientific notation is used
(ohms, kilo-ohms)
Series and Parallel Resistors
Series resistors
Parallel resistors
Basic schematic symbols for various components
Capacitors
Inductors
Basic schematic symbols for various components
Switches
Basic schematic symbols for various components
DC or AC Voltage Batteries
Voltage Nodes
Batteries / DC Power
● Provides voltages via power and ground
● The short bar is a negative terminal
● Do not create a short circuit
Basic schematic symbols for various components
Diodes
Light-emitting diodes
●
Two terminals: anode and cathode
● Current only flows in one direction, anode to
cathode. One-way valve
● LEDs light when current flows
● Only in forward bias condition when Anode-
Cathode voltage must be above threshold
– Threshold depends on diode
●
Reverse Biased condition when anode is
negative with respect to the cathode
● Diodes have a maximum current limit
– Maybe 20mA
– Do not connect an LED directly across a 5V
supply (Too much current without a resistor)
Diodes and LEDs
Basic schematic symbols for various components
Transistors
Bipolar Junction Transistors (BJTs)
Basic schematic symbols for various components
Transistors
Metal Oxide Field-Effect Transistors (MOSFETs)
Basic schematic symbols for various components
Digital Logic Gates
Basic schematic symbols for various components
Integrated Circuits
Basic schematic symbols for various components
Headers and Connectors
Transformers and Relays
Basic schematic symbols for various components
Speakers, buzzers and Motors
Junctions and Nodes
2. How to use a Breadboard
3. ESP8266 - NodeMCU
NodeMCU is a ESP8266 with USB2TTL
every GPIO can be PWM, I2C, 1-wire
FCC CERTIFIED WI-FI module, PCB antenna
4. Setup Development Environment
● Fast & user friendly development
● Work with GPIO in Arduino style
● High effective in perfomance and memory usage (this is native firmware!)
● Compatible with standard Arduino libraries
● rBoot OTA firmware updating
● Built-in file system: spiffs
● Built-in powerfull network and wireless modules
● Built-in JSON library: ArduinoJson
● HTTP, AJAX, WebSockets support
● MQTT protocol based on libemqtt
● Networking based on LWIP stack
● Simple and powerfull hardware API wrappers
● Based on Espressif NONOS SDK 1.4.0 & 1.5.0
Sming Framework
Step 1: Install prerequisites
# Ubuntu
$ sudo apt-get install make unrar autoconf automake libtool libtool-bin
gcc g++ gperf flex bison texinfo gawk ncurses-dev libexpat1-dev
python sed python-serial python-dev srecord bc git help2man
# Fedora
$ sudo dnf install make unrar autoconf automake libtool gcc gcc-c++
gperf flex bison texinfo gawk ncurses-devel expat-devel python sed
pyserial srecord bc git patch
4.1 Tools Chains
● Sming Core SDK is a open Source framework for high efficiency
WiFi SoC ESP8266 native development with C++ language.
● Esptool.py is a cute Python utility to communicate with the ROM
bootloader in Espressif ESP8266
● Esptool2 is a tool for creating rom images for the ESP8266
Step 2: Build SDK & Environment
Build esp-open-sdk
$ mkdir -p /opt/
$ cd /opt/
$ git clone --recursive https://github.com/pfalcon/esp-open-sdk.git
$ cd esp-open-sdk
$ sudo chown -R $USER:$USER ./
$ make STANDALONE=y
Set Environment Variables
$ export ESP_HOME=/opt/esp-open-sdk
$ export SMING_HOME=~/Sming/Sming
$ vim ~/.bashrc
$ vim ~/.zshrc
Step 3: Build SDK & Environment
Get and Build Sming Core
$ cd $SMING_HOME/../..
$ git clone https://github.com/SmingHub/Sming.git
$ cd Sming/Sming
$ make
$ make spiffy
Step 4: Tools
Install esptool.py
$ sudo apt-get install python-serial unzip
$ wget https://github.com/themadinventor/esptool/archive/master.zip
$ unzip master.zip
$ mv esptool-master $ESP_HOME/esptool
$ echo $ESP_HOME/esptool
/opt/esp-open-sdk/esptool
$ rm master.zip
Install esptool2
$ cd $ESP_HOME
$ git clone https://github.com/raburton/esptool2
$ cd esptool2
$ make
$ export PATH=$PATH:$ESP_HOME/esptool2
$ vim ~/.bashrc
$ vim ~/.zsrhc
Step 5: Check List
$ cat ~/.zshrc
export ESP_HOME=/opt/esp-open-sdk
export PATH=/opt/esp-open-sdk/xtensa-lx106-elf/bin:$PATH:$ESP_HOME/esptool2
export SMING_HOME=/opt/Sming/Sming
$ which esptool2
/opt/esp-open-sdk/esptool2/esptool2
$ which esptool.py
/opt/esp-open-sdk/xtensa-lx106-elf/bin/esptool.py
Step 6: Eclipse
Import Sming Sample Projects
Project Window
→Import then General
→Existing Projects into Workspace
→ Next
Step 6: Eclipse
Enable Sming Code Completion
Window
→Preferences
→C/C++ → Build → Environments
→Add New variable
Step 6: Eclipse
Project References
Window
→Choose a example project
→Properties
→Project References
→Tick SmingFramework
5. Example
5.1 Blink.
├── app
│ └── application.cpp
├── include
│ └── user_config.h
├── Makefile
└── Makefile-user.mk
#include <user_config.h>
#include <SmingCore/SmingCore.h>
#define LED_PIN 2 // GPIO2
Timer procTimer;
bool state = true;
void blink() {
digitalWrite(LED_PIN, state);
state = !state;
}
void init() {
pinMode(LED_PIN, OUTPUT);
procTimer.initializeMs(1000, blink).start();
}
5.2 HTTP Server
server.listen(80);
server.addPath("/", onIndex);
server.addPath("/hello", onHello);
server.setDefaultHandler(onFile);
Serial.println("=== WEB SERVER STARTED ===");
Serial.println(WifiStation.getIP());
void onIndex(HttpRequest &request, HttpResponse &response) {
TemplateFileStream *tmpl = new TemplateFileStream("index.html");
auto &vars = tmpl->variables();
vars["counter"] = String(counter);
vars["IP"] = WifiStation.getIP().toString();
vars["MAC"] = WifiStation.getMAC();
response.sendTemplate(tmpl);
}
void onFile(HttpRequest &request, HttpResponse &response) {
String file = request.getPath();
if (file[0] == '/')
file = file.substring(1);
response.setCache(86400, true);
response.sendFile(file);
}
6. More
→ An open-source firmware and development kit that helps you
to prototype your IOT product within a few Lua script lines
→ Get Started with ESP8266 Using Arduino
→ Getting started with MicroPython on the ESP8266
→ NodeMCU custom builds

More Related Content

What's hot

Arduino
ArduinoArduino
Arduino
Paras Bhanot
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
Richard Rixham
 
NVDK-ESP32 Quick Start Guide
NVDK-ESP32 Quick Start GuideNVDK-ESP32 Quick Start Guide
NVDK-ESP32 Quick Start Guide
NEEVEE Technologies
 
Esp8266 basics
Esp8266 basicsEsp8266 basics
Esp8266 basics
Eueung Mulyana
 
IOT Talking to Webserver - how to
IOT Talking to Webserver - how to IOT Talking to Webserver - how to
IOT Talking to Webserver - how to
Indraneel Ganguli
 
Esp8266 Workshop
Esp8266 WorkshopEsp8266 Workshop
Esp8266 Workshop
Stijn van Drunen
 
Adafruit Huzzah Esp8266 WiFi Board
Adafruit Huzzah Esp8266 WiFi BoardAdafruit Huzzah Esp8266 WiFi Board
Adafruit Huzzah Esp8266 WiFi Board
Biagio Botticelli
 
lesson1 - Getting Started with ESP8266
lesson1 -  Getting Started with ESP8266lesson1 -  Getting Started with ESP8266
lesson1 - Getting Started with ESP8266
Elaf A.Saeed
 
Esp8266 NodeMCU
Esp8266 NodeMCUEsp8266 NodeMCU
Esp8266 NodeMCU
roadster43
 
WiFi SoC ESP8266
WiFi SoC ESP8266WiFi SoC ESP8266
WiFi SoC ESP8266
Devesh Samaiya
 
ESP8266 Wifi Nodemcu
ESP8266 Wifi Nodemcu ESP8266 Wifi Nodemcu
ESP8266 Wifi Nodemcu
creatjet3d labs
 
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
 
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
 
Arduino1.0 RC
Arduino1.0 RCArduino1.0 RC
Arduino1.0 RC
馬 萬圳
 
lwM2M OTA for ESP8266
lwM2M OTA for ESP8266lwM2M OTA for ESP8266
lwM2M OTA for ESP8266
Manolis Nikiforakis
 
Internet-of-Things with (Arduino+XBee)
Internet-of-Things with (Arduino+XBee)Internet-of-Things with (Arduino+XBee)
Internet-of-Things with (Arduino+XBee)
santiagojbt
 
Arduino Development For Beginners
Arduino Development For BeginnersArduino Development For Beginners
Arduino Development For Beginners
FTS seminar
 
Aurdino presentation
Aurdino presentationAurdino presentation
Aurdino presentation
C.Vamsi Krishna
 
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
 
Arduino technical session 1
Arduino technical session 1Arduino technical session 1
Arduino technical session 1
Audiomas Soni
 

What's hot (20)

Arduino
ArduinoArduino
Arduino
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
NVDK-ESP32 Quick Start Guide
NVDK-ESP32 Quick Start GuideNVDK-ESP32 Quick Start Guide
NVDK-ESP32 Quick Start Guide
 
Esp8266 basics
Esp8266 basicsEsp8266 basics
Esp8266 basics
 
IOT Talking to Webserver - how to
IOT Talking to Webserver - how to IOT Talking to Webserver - how to
IOT Talking to Webserver - how to
 
Esp8266 Workshop
Esp8266 WorkshopEsp8266 Workshop
Esp8266 Workshop
 
Adafruit Huzzah Esp8266 WiFi Board
Adafruit Huzzah Esp8266 WiFi BoardAdafruit Huzzah Esp8266 WiFi Board
Adafruit Huzzah Esp8266 WiFi Board
 
lesson1 - Getting Started with ESP8266
lesson1 -  Getting Started with ESP8266lesson1 -  Getting Started with ESP8266
lesson1 - Getting Started with ESP8266
 
Esp8266 NodeMCU
Esp8266 NodeMCUEsp8266 NodeMCU
Esp8266 NodeMCU
 
WiFi SoC ESP8266
WiFi SoC ESP8266WiFi SoC ESP8266
WiFi SoC ESP8266
 
ESP8266 Wifi Nodemcu
ESP8266 Wifi Nodemcu ESP8266 Wifi Nodemcu
ESP8266 Wifi Nodemcu
 
IoT Hands-On-Lab, KINGS, 2019
IoT Hands-On-Lab, KINGS, 2019IoT Hands-On-Lab, KINGS, 2019
IoT Hands-On-Lab, KINGS, 2019
 
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
 
Arduino1.0 RC
Arduino1.0 RCArduino1.0 RC
Arduino1.0 RC
 
lwM2M OTA for ESP8266
lwM2M OTA for ESP8266lwM2M OTA for ESP8266
lwM2M OTA for ESP8266
 
Internet-of-Things with (Arduino+XBee)
Internet-of-Things with (Arduino+XBee)Internet-of-Things with (Arduino+XBee)
Internet-of-Things with (Arduino+XBee)
 
Arduino Development For Beginners
Arduino Development For BeginnersArduino Development For Beginners
Arduino Development For Beginners
 
Aurdino presentation
Aurdino presentationAurdino presentation
Aurdino presentation
 
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
 
Arduino technical session 1
Arduino technical session 1Arduino technical session 1
Arduino technical session 1
 

Viewers also liked

Intel 05th October 2015
Intel 05th October 2015Intel 05th October 2015
Intel 05th October 2015
Smart Dublin
 
Deploying IoT to Support Low-Income Seniors at Home - Sombit Mishra
Deploying IoT to Support Low-Income Seniors at Home - Sombit MishraDeploying IoT to Support Low-Income Seniors at Home - Sombit Mishra
Deploying IoT to Support Low-Income Seniors at Home - Sombit Mishra
WithTheBest
 
Anesthesiology ML
Anesthesiology MLAnesthesiology ML
Anesthesiology ML
Margaret LaPorte
 
Raspbeery PI IoT
Raspbeery PI IoTRaspbeery PI IoT
Raspbeery PI IoT
Tony Gerdjikov
 
IoT in Smart City solutions
IoT in Smart City solutionsIoT in Smart City solutions
IoT in Smart City solutions
SoInteractive
 
Iot intro
Iot introIot intro
Iot intro
skumartarget
 
Introduction To The IBM IoT Foundation
Introduction To The IBM IoT FoundationIntroduction To The IBM IoT Foundation
Introduction To The IBM IoT Foundation
petecrocker
 
IoT (Internet of Things) Smart City Architecture
IoT (Internet of Things) Smart City ArchitectureIoT (Internet of Things) Smart City Architecture
IoT (Internet of Things) Smart City Architecture
Alex G. Lee, Ph.D. Esq. CLP
 
Home Automation by ESP8266
Home Automation by ESP8266Home Automation by ESP8266
Home Automation by ESP8266
Gleb Vinnikov
 
IoT: An introduction
IoT: An introductionIoT: An introduction
IoT: An introduction
JWORKS powered by Ordina
 
Nodemcu - introduction
Nodemcu - introductionNodemcu - introduction
Nodemcu - introduction
Michal Sedlak
 
ESP8266 and IOT
ESP8266 and IOTESP8266 and IOT
ESP8266 and IOT
dega1999
 
Internet of Things: mercato, tecnologie, applicazioni e competenze
Internet of Things: mercato, tecnologie, applicazioni e competenzeInternet of Things: mercato, tecnologie, applicazioni e competenze
Internet of Things: mercato, tecnologie, applicazioni e competenze
Armando Martin
 
Build WiFi gadgets using esp8266
Build WiFi gadgets using esp8266Build WiFi gadgets using esp8266
Build WiFi gadgets using esp8266
Baoshi Zhu
 
Internet of things
Internet of thingsInternet of things
Internet of things
Sara Scotti
 
NodeMCU ESP8266 workshop 1
NodeMCU ESP8266 workshop 1NodeMCU ESP8266 workshop 1
NodeMCU ESP8266 workshop 1
Andy Gelme
 
Controllo apertura cancello GSM
Controllo apertura cancello GSMControllo apertura cancello GSM
Controllo apertura cancello GSM
Davide Mercanti
 
esp8266 Wifi 4 PIC
esp8266 Wifi 4 PICesp8266 Wifi 4 PIC
esp8266 Wifi 4 PIC
Davide Mercanti
 
Building the Next Smart City With Mobile Cyber-Physical Systems
Building the Next Smart City With Mobile Cyber-Physical SystemsBuilding the Next Smart City With Mobile Cyber-Physical Systems
Building the Next Smart City With Mobile Cyber-Physical Systems
Dr. Mazlan Abbas
 
Big data, iot &amp; smart city
Big data, iot &amp; smart cityBig data, iot &amp; smart city
Big data, iot &amp; smart city
imran2017
 

Viewers also liked (20)

Intel 05th October 2015
Intel 05th October 2015Intel 05th October 2015
Intel 05th October 2015
 
Deploying IoT to Support Low-Income Seniors at Home - Sombit Mishra
Deploying IoT to Support Low-Income Seniors at Home - Sombit MishraDeploying IoT to Support Low-Income Seniors at Home - Sombit Mishra
Deploying IoT to Support Low-Income Seniors at Home - Sombit Mishra
 
Anesthesiology ML
Anesthesiology MLAnesthesiology ML
Anesthesiology ML
 
Raspbeery PI IoT
Raspbeery PI IoTRaspbeery PI IoT
Raspbeery PI IoT
 
IoT in Smart City solutions
IoT in Smart City solutionsIoT in Smart City solutions
IoT in Smart City solutions
 
Iot intro
Iot introIot intro
Iot intro
 
Introduction To The IBM IoT Foundation
Introduction To The IBM IoT FoundationIntroduction To The IBM IoT Foundation
Introduction To The IBM IoT Foundation
 
IoT (Internet of Things) Smart City Architecture
IoT (Internet of Things) Smart City ArchitectureIoT (Internet of Things) Smart City Architecture
IoT (Internet of Things) Smart City Architecture
 
Home Automation by ESP8266
Home Automation by ESP8266Home Automation by ESP8266
Home Automation by ESP8266
 
IoT: An introduction
IoT: An introductionIoT: An introduction
IoT: An introduction
 
Nodemcu - introduction
Nodemcu - introductionNodemcu - introduction
Nodemcu - introduction
 
ESP8266 and IOT
ESP8266 and IOTESP8266 and IOT
ESP8266 and IOT
 
Internet of Things: mercato, tecnologie, applicazioni e competenze
Internet of Things: mercato, tecnologie, applicazioni e competenzeInternet of Things: mercato, tecnologie, applicazioni e competenze
Internet of Things: mercato, tecnologie, applicazioni e competenze
 
Build WiFi gadgets using esp8266
Build WiFi gadgets using esp8266Build WiFi gadgets using esp8266
Build WiFi gadgets using esp8266
 
Internet of things
Internet of thingsInternet of things
Internet of things
 
NodeMCU ESP8266 workshop 1
NodeMCU ESP8266 workshop 1NodeMCU ESP8266 workshop 1
NodeMCU ESP8266 workshop 1
 
Controllo apertura cancello GSM
Controllo apertura cancello GSMControllo apertura cancello GSM
Controllo apertura cancello GSM
 
esp8266 Wifi 4 PIC
esp8266 Wifi 4 PICesp8266 Wifi 4 PIC
esp8266 Wifi 4 PIC
 
Building the Next Smart City With Mobile Cyber-Physical Systems
Building the Next Smart City With Mobile Cyber-Physical SystemsBuilding the Next Smart City With Mobile Cyber-Physical Systems
Building the Next Smart City With Mobile Cyber-Physical Systems
 
Big data, iot &amp; smart city
Big data, iot &amp; smart cityBig data, iot &amp; smart city
Big data, iot &amp; smart city
 

Similar to [MakerHN] [IoT] [01] Intro 2

Getting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer KitGetting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer Kit
Sulamita Garcia
 
arduino.pdf
arduino.pdfarduino.pdf
arduino.pdf
Gurumurthy B R
 
Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!
Codemotion
 
Начало работы с Intel IoT Dev Kit
Начало работы с Intel IoT Dev KitНачало работы с Intel IoT Dev Kit
Начало работы с Intel IoT Dev Kit
Intel® Developer Zone Россия
 
Remote tanklevelmonitor
Remote tanklevelmonitorRemote tanklevelmonitor
Remote tanklevelmonitor
Parshwadeep Lahane
 
Wi-Fi Esp8266 nodemcu
Wi-Fi Esp8266 nodemcu Wi-Fi Esp8266 nodemcu
Wi-Fi Esp8266 nodemcu
creatjet3d labs
 
Gas leakage detection system
Gas leakage detection systemGas leakage detection system
Gas leakage detection system
Aashiq Ahamed N
 
IoT Getting Started with Intel® IoT Devkit
IoT Getting Started with Intel® IoT DevkitIoT Getting Started with Intel® IoT Devkit
IoT Getting Started with Intel® IoT Devkit
Vasily Ryzhonkov
 
Introduction of Arduino Uno
Introduction of Arduino UnoIntroduction of Arduino Uno
Introduction of Arduino Uno
Md. Nahidul Islam
 
Taller IoT en la Actualidad
Taller IoT en la ActualidadTaller IoT en la Actualidad
Taller IoT en la Actualidad
Laurence HR
 
IOT WORKSHEET 1.4.pdf
IOT WORKSHEET 1.4.pdfIOT WORKSHEET 1.4.pdf
IOT WORKSHEET 1.4.pdf
MayuRana1
 
Hardware hacking
Hardware hackingHardware hacking
Hardware hacking
Tavish Naruka
 
Tac Presentation October 72014- Raspberry PI
Tac Presentation October 72014- Raspberry PITac Presentation October 72014- Raspberry PI
Tac Presentation October 72014- Raspberry PI
Cliff Samuels Jr.
 
Arduino and Circuits.docx
Arduino and Circuits.docxArduino and Circuits.docx
Arduino and Circuits.docx
Ajay578679
 
Arduino
ArduinoArduino
Arduino
Jerin John
 
Smartphone++
Smartphone++Smartphone++
Smartphone++
mharkus
 
Webshield internet of things
Webshield internet of thingsWebshield internet of things
Webshield internet of things
Raghav Shetty
 
Programando o ESP8266 com Python
Programando o ESP8266 com PythonProgramando o ESP8266 com Python
Programando o ESP8266 com Python
Relsi Maron
 
Workshop on IoT and Basic Home Automation_BAIUST.pptx
Workshop on IoT and Basic Home Automation_BAIUST.pptxWorkshop on IoT and Basic Home Automation_BAIUST.pptx
Workshop on IoT and Basic Home Automation_BAIUST.pptx
Redwan Ferdous
 
The Deck by Phil Polstra GrrCON2012
The Deck by Phil Polstra GrrCON2012The Deck by Phil Polstra GrrCON2012
The Deck by Phil Polstra GrrCON2012
Philip Polstra
 

Similar to [MakerHN] [IoT] [01] Intro 2 (20)

Getting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer KitGetting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer Kit
 
arduino.pdf
arduino.pdfarduino.pdf
arduino.pdf
 
Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!
 
Начало работы с Intel IoT Dev Kit
Начало работы с Intel IoT Dev KitНачало работы с Intel IoT Dev Kit
Начало работы с Intel IoT Dev Kit
 
Remote tanklevelmonitor
Remote tanklevelmonitorRemote tanklevelmonitor
Remote tanklevelmonitor
 
Wi-Fi Esp8266 nodemcu
Wi-Fi Esp8266 nodemcu Wi-Fi Esp8266 nodemcu
Wi-Fi Esp8266 nodemcu
 
Gas leakage detection system
Gas leakage detection systemGas leakage detection system
Gas leakage detection system
 
IoT Getting Started with Intel® IoT Devkit
IoT Getting Started with Intel® IoT DevkitIoT Getting Started with Intel® IoT Devkit
IoT Getting Started with Intel® IoT Devkit
 
Introduction of Arduino Uno
Introduction of Arduino UnoIntroduction of Arduino Uno
Introduction of Arduino Uno
 
Taller IoT en la Actualidad
Taller IoT en la ActualidadTaller IoT en la Actualidad
Taller IoT en la Actualidad
 
IOT WORKSHEET 1.4.pdf
IOT WORKSHEET 1.4.pdfIOT WORKSHEET 1.4.pdf
IOT WORKSHEET 1.4.pdf
 
Hardware hacking
Hardware hackingHardware hacking
Hardware hacking
 
Tac Presentation October 72014- Raspberry PI
Tac Presentation October 72014- Raspberry PITac Presentation October 72014- Raspberry PI
Tac Presentation October 72014- Raspberry PI
 
Arduino and Circuits.docx
Arduino and Circuits.docxArduino and Circuits.docx
Arduino and Circuits.docx
 
Arduino
ArduinoArduino
Arduino
 
Smartphone++
Smartphone++Smartphone++
Smartphone++
 
Webshield internet of things
Webshield internet of thingsWebshield internet of things
Webshield internet of things
 
Programando o ESP8266 com Python
Programando o ESP8266 com PythonProgramando o ESP8266 com Python
Programando o ESP8266 com Python
 
Workshop on IoT and Basic Home Automation_BAIUST.pptx
Workshop on IoT and Basic Home Automation_BAIUST.pptxWorkshop on IoT and Basic Home Automation_BAIUST.pptx
Workshop on IoT and Basic Home Automation_BAIUST.pptx
 
The Deck by Phil Polstra GrrCON2012
The Deck by Phil Polstra GrrCON2012The Deck by Phil Polstra GrrCON2012
The Deck by Phil Polstra GrrCON2012
 

Recently uploaded

Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
chanes7
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
NgcHiNguyn25
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
National Information Standards Organization (NISO)
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
taiba qazi
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
ak6969907
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
IreneSebastianRueco1
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
Colégio Santa Teresinha
 

Recently uploaded (20)

Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
 

[MakerHN] [IoT] [01] Intro 2

  • 1. Internet of Things for Dummies Week 1 $ whoami Ha Trung Hieu aka Harry Ha hieuht@0x1115.org @makerhanoi @2016, September 24
  • 2. IoT devices combine hardware and software - Hardware interacts with the world - Software takes the is the data received from the hardware and It is“Intelligence”
  • 3. Outline; 1. How to read a schematic 2. How to use a Breadboard 3. ESP8266 NodeMCU 4. Setup development environment 5. Example 6. More
  • 4. 1. How to read a schematic
  • 5. Basic schematic symbols for various components Resistors Potentiometers and Variable Resistors
  • 6. Resistors ● Provides resistance to current flow ● Two terminals, not difference between them ● Band colors indicate resistor size – Each color is a digit; scientific notation is used (ohms, kilo-ohms)
  • 7. Series and Parallel Resistors Series resistors Parallel resistors
  • 8. Basic schematic symbols for various components Capacitors Inductors
  • 9. Basic schematic symbols for various components Switches
  • 10. Basic schematic symbols for various components DC or AC Voltage Batteries Voltage Nodes
  • 11. Batteries / DC Power ● Provides voltages via power and ground ● The short bar is a negative terminal ● Do not create a short circuit
  • 12. Basic schematic symbols for various components Diodes Light-emitting diodes
  • 13. ● Two terminals: anode and cathode ● Current only flows in one direction, anode to cathode. One-way valve ● LEDs light when current flows ● Only in forward bias condition when Anode- Cathode voltage must be above threshold – Threshold depends on diode ● Reverse Biased condition when anode is negative with respect to the cathode ● Diodes have a maximum current limit – Maybe 20mA – Do not connect an LED directly across a 5V supply (Too much current without a resistor) Diodes and LEDs
  • 14. Basic schematic symbols for various components Transistors Bipolar Junction Transistors (BJTs)
  • 15. Basic schematic symbols for various components Transistors Metal Oxide Field-Effect Transistors (MOSFETs)
  • 16. Basic schematic symbols for various components Digital Logic Gates
  • 17. Basic schematic symbols for various components Integrated Circuits
  • 18. Basic schematic symbols for various components Headers and Connectors Transformers and Relays
  • 19. Basic schematic symbols for various components Speakers, buzzers and Motors Junctions and Nodes
  • 20. 2. How to use a Breadboard
  • 21. 3. ESP8266 - NodeMCU NodeMCU is a ESP8266 with USB2TTL every GPIO can be PWM, I2C, 1-wire FCC CERTIFIED WI-FI module, PCB antenna
  • 22. 4. Setup Development Environment ● Fast & user friendly development ● Work with GPIO in Arduino style ● High effective in perfomance and memory usage (this is native firmware!) ● Compatible with standard Arduino libraries ● rBoot OTA firmware updating ● Built-in file system: spiffs ● Built-in powerfull network and wireless modules ● Built-in JSON library: ArduinoJson ● HTTP, AJAX, WebSockets support ● MQTT protocol based on libemqtt ● Networking based on LWIP stack ● Simple and powerfull hardware API wrappers ● Based on Espressif NONOS SDK 1.4.0 & 1.5.0 Sming Framework
  • 23. Step 1: Install prerequisites # Ubuntu $ sudo apt-get install make unrar autoconf automake libtool libtool-bin gcc g++ gperf flex bison texinfo gawk ncurses-dev libexpat1-dev python sed python-serial python-dev srecord bc git help2man # Fedora $ sudo dnf install make unrar autoconf automake libtool gcc gcc-c++ gperf flex bison texinfo gawk ncurses-devel expat-devel python sed pyserial srecord bc git patch
  • 24. 4.1 Tools Chains ● Sming Core SDK is a open Source framework for high efficiency WiFi SoC ESP8266 native development with C++ language. ● Esptool.py is a cute Python utility to communicate with the ROM bootloader in Espressif ESP8266 ● Esptool2 is a tool for creating rom images for the ESP8266
  • 25. Step 2: Build SDK & Environment Build esp-open-sdk $ mkdir -p /opt/ $ cd /opt/ $ git clone --recursive https://github.com/pfalcon/esp-open-sdk.git $ cd esp-open-sdk $ sudo chown -R $USER:$USER ./ $ make STANDALONE=y Set Environment Variables $ export ESP_HOME=/opt/esp-open-sdk $ export SMING_HOME=~/Sming/Sming $ vim ~/.bashrc $ vim ~/.zshrc
  • 26. Step 3: Build SDK & Environment Get and Build Sming Core $ cd $SMING_HOME/../.. $ git clone https://github.com/SmingHub/Sming.git $ cd Sming/Sming $ make $ make spiffy
  • 27. Step 4: Tools Install esptool.py $ sudo apt-get install python-serial unzip $ wget https://github.com/themadinventor/esptool/archive/master.zip $ unzip master.zip $ mv esptool-master $ESP_HOME/esptool $ echo $ESP_HOME/esptool /opt/esp-open-sdk/esptool $ rm master.zip Install esptool2 $ cd $ESP_HOME $ git clone https://github.com/raburton/esptool2 $ cd esptool2 $ make $ export PATH=$PATH:$ESP_HOME/esptool2 $ vim ~/.bashrc $ vim ~/.zsrhc
  • 28. Step 5: Check List $ cat ~/.zshrc export ESP_HOME=/opt/esp-open-sdk export PATH=/opt/esp-open-sdk/xtensa-lx106-elf/bin:$PATH:$ESP_HOME/esptool2 export SMING_HOME=/opt/Sming/Sming $ which esptool2 /opt/esp-open-sdk/esptool2/esptool2 $ which esptool.py /opt/esp-open-sdk/xtensa-lx106-elf/bin/esptool.py
  • 29. Step 6: Eclipse Import Sming Sample Projects Project Window →Import then General →Existing Projects into Workspace → Next
  • 30. Step 6: Eclipse Enable Sming Code Completion Window →Preferences →C/C++ → Build → Environments →Add New variable
  • 31. Step 6: Eclipse Project References Window →Choose a example project →Properties →Project References →Tick SmingFramework
  • 33. 5.1 Blink. ├── app │ └── application.cpp ├── include │ └── user_config.h ├── Makefile └── Makefile-user.mk #include <user_config.h> #include <SmingCore/SmingCore.h> #define LED_PIN 2 // GPIO2 Timer procTimer; bool state = true; void blink() { digitalWrite(LED_PIN, state); state = !state; } void init() { pinMode(LED_PIN, OUTPUT); procTimer.initializeMs(1000, blink).start(); }
  • 34. 5.2 HTTP Server server.listen(80); server.addPath("/", onIndex); server.addPath("/hello", onHello); server.setDefaultHandler(onFile); Serial.println("=== WEB SERVER STARTED ==="); Serial.println(WifiStation.getIP()); void onIndex(HttpRequest &request, HttpResponse &response) { TemplateFileStream *tmpl = new TemplateFileStream("index.html"); auto &vars = tmpl->variables(); vars["counter"] = String(counter); vars["IP"] = WifiStation.getIP().toString(); vars["MAC"] = WifiStation.getMAC(); response.sendTemplate(tmpl); } void onFile(HttpRequest &request, HttpResponse &response) { String file = request.getPath(); if (file[0] == '/') file = file.substring(1); response.setCache(86400, true); response.sendFile(file); }
  • 35. 6. More → An open-source firmware and development kit that helps you to prototype your IOT product within a few Lua script lines → Get Started with ESP8266 Using Arduino → Getting started with MicroPython on the ESP8266 → NodeMCU custom builds