You are on page 1of 71

Table

of Contents
Cover 1.1
Introduction 1.2
Hardware 1.3
Microcontroller 1.3.1
Firmware 1.4
Toolchain 1.4.1
Tools 1.4.2
Development Platform 1.5
Arduino 1.5.1
Arduino Cloud 1.5.1.1
PlatformIO 1.5.2
Setup 1.5.2.1
Led 1.5.2.2
Mqtt 1.5.2.3
Blynk 1.5.2.4
Structure IoT Development Platform 1.5.3
Python 1.5.4
x86 1.5.4.1
Esp8266 1.5.4.2
Espressif 1.5.5
NodeMCU 1.5.6
Libraries 1.6
Projects 1.7
WiFi 1.7.1
Mqtt 1.7.2
Adafruit 1.7.3
WebServer 1.7.4

1
IBM Watson IoT 1.7.5
Sandbox 1.8

2
Cover

ESP8266

by The IoT Learning Initiative

Experiment, Make, Innovate

3
Introduction

Introduction

ESP8266
The ESP8266 is a low-cost Wi-Fi chip with full TCP/IP stack and microcontroller
capability produced by Shanghai-based Chinese manufacturer, Espressif.
Wikipedia

ESP8266 Community Forum


ESP8266 Github Community Forum
ESP8266 Wiki
ESP8266EX Datasheet
ESP8266 Datasheet
ESP8266 Graphical Datasheet
Nurdspace ESP8266
ESP8266 Projects

ESP8266 Wiki
ESP8266 Wiki
ESP8266 Wiki Toolchain

4
Hardware

Hardware
ESP8266 Module Family

5
Microcontroller

Microcontroller

Espressif 8266
ESP8266EX is among the most integrated Wi-Fi chips in the industry.
Measuring just 5mm x 5mm, ESP8266EX requires minimal external circuitry
and integrates a 32-bit Tensilica MCU, standard digital peripheral interfaces,
antenna switches, RF balun, power amplifier, low noise receive amplifier,
filters and power management modules - all in one small package. Homepage
Low-power, highly-integrated Wi-Fi solution A minimal of 7 external
components Wide temperature range: -40C to +125C ESP8285 - ESP8266
embeded with 8 Mbit flash

Resources

SDKs & Demos


Tools
Samples Codes
Documentation
FAQs

Linux Host Dmesg

6
Microcontroller

[12447.680034] usb 5-1: new full-speed USB device number 2 u


sing uhci_hcd
[12448.052042] usb 5-1: New USB device found, idVendor=10c4,
idProduct=ea60
[12448.052047] usb 5-1: New USB device strings: Mfr=1, Produ
ct=2, SerialNumber=3
[12448.052050] usb 5-1: Product: CP2102 USB to UART Bridge C
ontroller
[12448.052053] usb 5-1: Manufacturer: Silicon Labs
[12448.052055] usb 5-1: SerialNumber: 0001
[12449.956079] usbcore: registered new interface driver usbs
erial
[12449.956099] usbcore: registered new interface driver usbs
erial_generic
[12449.956116] usbserial: USB Serial support registered for
generic
[12449.965489] usbcore: registered new interface driver cp21
0x
[12449.965508] usbserial: USB Serial support registered for
cp210x
[12449.965538] cp210x 5-1:1.0: cp210x converter detected
[12450.076028] usb 5-1: reset full-speed USB device number 2
using uhci_hcd
[12450.228219] usb 5-1: cp210x converter now attached to tty
USB0

7
Firmware

Firmware
You customize your NodeMCU firmware and we build it. Just for you.
NodeMCU Custom Builds Lua based interactive firmware for mcu like
esp8266

NodeMCU Custom Builds Homepage


Docker NodeMCU build
Flashing the NodeMCU firmware on the ESP8266 (Linux) - Guide
Github NodeMcu-Firmware

8
Toolchain

Toolchain

Esp8266 SDK
Building the toolchain

ESP Open SDK


Free and open (as much as possible) integrated SDK for ESP8266/ESP8285
chips

Github

root@host:~# sudo apt-get install make unrar-free autoconf autom


ake libtool gcc g++ gperf \
flex bison texinfo gawk ncurses-dev libexpat-dev python-dev
python python-serial \
sed git unzip bash help2man wget bzip2

root@host:~# sudo apt-get install libtool-bin

root@host:~$ git clone --recursive https://github.com/pfalcon/es


p-open-sdk.git
root@host:~$ cd esp-open-sdk/
root@host:~$ make

root@host:~$ export PATH=/home/xe1gyq/NodeMcu/esp-open-sdk/xtens


a-lx106-elf/bin:$PATH

ESP Open SDK Update

9
Toolchain

$ make clean
$ git pull
$ git submodule sync
$ git submodule update

10
Tools

Tools

ESP Tool
A cute Python utility to communicate with the ROM bootloader in Espressif
ESP8266. It is intended to be a simple, platform independent, open source
replacement for XTCOM.

Github

xe1gyq@jessie:~$ sudo pip install setuptools


xe1gyq@jessie:~$ sudo pip install esptool

xe1gyq@jessie:~$ git clone https://github.com/themadinventor/esp


tool.git
Cloning into 'esptool'...
remote: Counting objects: 385, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 385 (delta 0), reused 0 (delta 0), pack-reused 382
Receiving objects: 100% (385/385), 152.05 KiB | 0 bytes/s, done.
Resolving deltas: 100% (211/211), done.
Checking connectivity... done.

xe1gyq@jessie:~$ cd esptool/
xe1gyq@jessie:~/esptool$ ls
esptool.py LICENSE MANIFEST.in README.md setup.py
xe1gyq@jessie:~/esptool$

root@jessie:/home/xe1gyq/esptool# sudo apt-get purge python-pkg-


resources
Reading package lists... Done
Building dependency tree
Reading state information... Done

11
Tools

The following packages were automatically installed and are no l


onger required:
libc-ares-dev libjs-node-uuid libjs-underscore libv8-3.14-dev
node-abbrev
node-ansi node-ansi-color-table node-archy node-async node-blo
ck-stream
node-combined-stream node-cookie-jar node-delayed-stream node-
forever-agent
node-form-data node-fstream node-fstream-ignore node-github-ur
l-from-git
node-glob node-graceful-fs node-inherits node-ini node-json-st
ringify-safe
node-lockfile node-lru-cache node-mime node-minimatch node-mkd
irp
node-mute-stream node-node-uuid node-nopt node-normalize-packa
ge-data
node-npmlog node-once node-osenv node-qs node-read node-read-p
ackage-json
node-request node-retry node-rimraf node-semver node-sha node-
sigmund
node-slide node-tar node-tunnel-agent node-underscore node-whi
ch nodejs-dev
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
gyp* node-gyp* npm* python-cryptography* python-openssl*
python-pkg-resources*
0 upgraded, 0 newly installed, 6 to remove and 3 not upgraded.
After this operation, 4,793 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 156395 files and directories currently ins
talled.)
Removing npm (1.4.21+ds-2) ...
Purging configuration files for npm (1.4.21+ds-2) ...
Removing node-gyp (0.12.2+ds-1) ...
Removing gyp (0.1~svn1729-3) ...
Removing python-openssl (0.14-1) ...
Removing python-cryptography (0.6.1-1) ...
Removing python-pkg-resources (5.5.1-1) ...
Processing triggers for man-db (2.7.0.2-5) ...

12
Tools

root@jessie:/home/xe1gyq/esptool# sudo apt-get -f install


Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no l
onger required:
libc-ares-dev libjs-node-uuid libjs-underscore libv8-3.14-dev
node-abbrev
node-ansi node-ansi-color-table node-archy node-async node-blo
ck-stream
node-combined-stream node-cookie-jar node-delayed-stream node-
forever-agent
node-form-data node-fstream node-fstream-ignore node-github-ur
l-from-git
node-glob node-graceful-fs node-inherits node-ini node-json-st
ringify-safe
node-lockfile node-lru-cache node-mime node-minimatch node-mkd
irp
node-mute-stream node-node-uuid node-nopt node-normalize-packa
ge-data
node-npmlog node-once node-osenv node-qs node-read node-read-p
ackage-json
node-request node-retry node-rimraf node-semver node-sha node-
sigmund
node-slide node-tar node-tunnel-agent node-underscore node-whi
ch nodejs-dev
python-cffi python-ply python-pycparser python-six
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
root@jessie:/home/xe1gyq/esptool# pip install pyserial
Collecting pyserial
Using cached pyserial-3.0.1.tar.gz
Building wheels for collected packages: pyserial
Running setup.py bdist_wheel for pyserial ... done
Stored in directory: /root/.cache/pip/wheels/06/71/f1/d8c81329
abcaf4c623daff8af76a7dbf00f055cb8205cec0ef
Successfully built pyserial
Installing collected packages: pyserial
Successfully installed pyserial-3.0.1
root@jessie:/home/xe1gyq/esptool#

13
Tools

root@jessie:/home/xe1gyq/esptool# python esptool.py write_flash


0x2000 nodemcu-master-14-modules-2016-04-10-05-04-51-integer.bin

Connecting...
Erasing flash...
Took 1.64s to erase flash block
Wrote 477184 bytes at 0x00002000 in 46.1 seconds (82.8 kbit/s)..
.

Leaving...

root@jessie:/home/xe1gyq/esptool# python esptool.py read_mac


Connecting...
MAC: 18:f0:14:da:27:2f
root@jessie:/home/xe1gyq/esptool# python esptool.py flash_id
Connecting...
Manufacturer: e0
Device: 4016
root@jessie:/home/xe1gyq/esptool# python esptool.py chip_id
Connecting...
Chip ID: 0x00dc273f

Node-MCU Firmware
lua based interactive firmware for mcu like esp8266 http://nodemcu.com

https://github.com/nodemcu/nodemcu-firmware
https://github.com/nodemcu/nodemcu-firmware/releases/tag/0.9.6-
dev_20150704
https://learn.sparkfun.com/tutorials/esp8266-thing-hookup-guide

14
Tools

user@host:~$ git clone --recursive https://github.com/pfalcon/es


p-open-sdk.git /opt/esp-open-sdk
user@host:~$ cd /opt/esp-open-sdk
user@host:~$ make STANDALONE=y
user@host:~$ PATH=/opt/esp-open-sdk/xtensa-lx106-elf/bin:$PATH
user@host:~$ git clone https://github.com/nodemcu/nodemcu-firmwa
re.git
user@host:~$ cd /opt/nodemcu-firmware
user@host:~$ make

http://hanneslehmann.github.io/2015/01/ESP8266Module_LUA/

15
Development Platform

Development Platform

Linux
1 Serial Connection

Port: /dev/ttyUSB0
Upload Speed: 115200

[12447.680034] usb 5-1: new full-speed USB device number 2 using


uhci_hcd
[12448.052042] usb 5-1: New USB device found, idVendor=10c4, idP
roduct=ea60
[12448.052047] usb 5-1: New USB device strings: Mfr=1, Product=2
, SerialNumber=3
[12448.052050] usb 5-1: Product: CP2102 USB to UART Bridge Contr
oller
[12448.052053] usb 5-1: Manufacturer: Silicon Labs
[12448.052055] usb 5-1: SerialNumber: 0001
[12449.956079] usbcore: registered new interface driver usbseria
l
[12449.956099] usbcore: registered new interface driver usbseria
l_generic
[12449.956116] usbserial: USB Serial support registered for gene
ric
[12449.965489] usbcore: registered new interface driver cp210x
[12449.965508] usbserial: USB Serial support registered for cp21
0x
[12449.965538] cp210x 5-1:1.0: cp210x converter detected
[12450.076028] usb 5-1: reset full-speed USB device number 2 usi
ng uhci_hcd
[12450.228219] usb 5-1: cp210x converter now attached to ttyUSB0

16
Development Platform

17
Arduino

Arduino IDE
Getting Started with Arduino
Unofficial list of 3rd party boards support urls
Generic ESP8266 modules
Olimex MOD-WIFI-ESP8266
NodeMCU 0.9 (ESP-12)
NodeMCU 1.0 (ESP-12E)
Adafruit HUZZAH ESP8266 (ESP-12)
SparkFun Thing
SweetPea ESP-210
WeMos D1
WeMos D1 mini

Setup Steps
1. File > Preferences > Additional Boards Manager URLs
http://arduino.esp8266.com/stable/package_esp8266com_index.json
2. Tools > Board > Board Manager

Linux Configuration

user@workstation:~/Downloads/arduino-1.8.2$ sudo usermod -a -G d


ialout xe1gyq

18
Arduino

[ 346.986871] usb 2-2.2: new full-speed USB device number 12 us


ing xhci_hcd
[ 347.137961] usb 2-2.2: New USB device found, idVendor=10c4, i
dProduct=ea60
[ 347.137964] usb 2-2.2: New USB device strings: Mfr=1, Product
=2, SerialNumber=3
[ 347.137965] usb 2-2.2: Product: CP2102 USB to UART Bridge Con
troller
[ 347.137966] usb 2-2.2: Manufacturer: Silicon Labs
[ 347.137968] usb 2-2.2: SerialNumber: 0001
[ 347.155481] usbcore: registered new interface driver cp210x
[ 347.155501] usbserial: USB Serial support registered for cp21
0x
[ 347.155536] cp210x 2-2.2:1.0: cp210x converter detected
[ 347.156815] usb 2-2.2: cp210x converter now attached to ttyUS
B0

Arduino IDE Configuration

Board: NodeMCU 1.0


CPU Frequency: 80 MHz
Flash Size: 4M (3M SPIFFS)
Upload Speed: 115200
Port: /dev/ttyUSB0

Board Info

BN: Unknown board


VID: 10C4
PID: EA60
SN: Upload any sketch to obtain it

After uploading in Linux console:

19
Arduino

Archiving built core (caching) in: /tmp/arduino_cache_802597/cor


e/core_esp8266_esp8266_nodemcuv2_CpuFrequency_80,UploadSpeed_115
200,FlashSize_4M3M_270be6ff9182869e36429f5bd365089d.a
Sketch uses 222129 bytes (21%) of program storage space. Maximum
is 1044464 bytes.
Global variables use 31496 bytes (38%) of dynamic memory, leavin
g 50424 bytes for local variables. Maximum is 81920 bytes.
Uploading 226272 bytes from /tmp/arduino_build_658763/Blink.ino.
bin to flash at 0x00000000
................................................................
................ [ 36% ]
................................................................
................ [ 72% ]
.............................................................
[ 100% ]

20
Arduino Cloud

Arduino Cloud
A simple tool to connect your Arduino boards to the internet and to each other.
In order to use the tool you'll need to configure your environment. Arduino
Cloud

21
PlatformIO

PlatformIO
PlatformIO is an open source ecosystem for IoT development with cross
platform build system, library manager and full support for Espressif
(ESP8266) development. It works on the popular host OS: Mac OS X,
Windows, Linux 32/64, Linux ARM (like Raspberry Pi, BeagleBone,
CubieBoard).

PlatformIO is an open source ecosystem for IoT development. Cross-platform


build system. Continuous and IDE integration. Arduino and MBED compatible.
PlatformIO

Integration with PlatformIO an open source ecosystem for IoT development.


Cross-platform code builder and library manager. Continuous and IDE
integration. Arduino and MBED compatible. Ready for Cloud compiling.
Homepage

PlatformIO Documentation

22
Setup

Setup

Documentation
This book contains the whole documentation for GitBook and gitbook.io.

You an contribute to improve it on GitHub: GitbookIO/documentation.

PlatformIO IDE Command Line Installation


The next-generation integrated development environment for IoT

Platform IO IDE
PlatformIo-Udev

23
Setup

root@workstation:~# pip install -U platformio


Collecting platformio
Downloading platformio-2.8.6-py27-none-any.whl (165kB)
100% || 174kB 1.0MB/s
Collecting click<6,>=3.2 (from platformio)
Downloading click-5.1-py2.py3-none-any.whl (65kB)
100% || 71kB 114kB/s
Requirement already up-to-date: requests<3,>=2.4.0 in /usr/local
/lib/python2.7/dist-packages (from platformio)
Requirement already up-to-date: pyserial<4 in /usr/local/lib/pyt
hon2.7/dist-packages (from platformio)
Collecting colorama (from platformio)
Downloading colorama-0.3.7-py2.py3-none-any.whl
Collecting bottle<0.13 (from platformio)
Downloading bottle-0.12.9.tar.gz (69kB)
100% || 71kB 108kB/s
Collecting lockfile<0.13,>=0.9.1 (from platformio)
Downloading lockfile-0.12.2-py2.py3-none-any.whl
Building wheels for collected packages: bottle
Running setup.py bdist_wheel for bottle ... done
Stored in directory: /root/.cache/pip/wheels/0f/bd/f7/21e85655
1fa937e3c8a9d9592fd74a50714af336b8ee4f42c7
Successfully built bottle
Installing collected packages: click, colorama, bottle, lockfile
, platformio
Found existing installation: colorama 0.3.6
Uninstalling colorama-0.3.6:
Successfully uninstalled colorama-0.3.6
Successfully installed bottle-0.12.9 click-5.1 colorama-0.3.7 lo
ckfile-0.12.2 platformio-2.8.6

24
Setup

user@workstation:~$ mkdir nodemcu


user@workstation:~$ cd nodemcu/
user@workstation:~/nodemcu$ platformio init --board=nodemcu

The current working directory /home/xe1gyq/nodemcu will be used


for project.
You can specify another project directory via
`platformio init -d %PATH_TO_THE_PROJECT_DIR%` command.

The next files/directories will be created in /home/xe1gyq/nodem


cu
platformio.ini - Project Configuration File. |-> PLEASE EDIT ME
<-|
src - Put your source files here
lib - Put here project specific (private) libraries
Do you want to continue? [y/N]: y

Project has been successfully initialized!


Useful commands:
`platformio run` - process/build project from the current direct
ory
`platformio run --target upload` or `platformio run -t upload` -
upload firmware to embedded board
`platformio run --target clean` - clean project (remove compiled
files)
`platformio run --help` - additional information

PlatformIO Libraries

25
Setup

user@workstation:~/nodemcu$ platformio lib


Usage: platformio lib [OPTIONS] COMMAND [ARGS]...

Options:
-h, --help Show this message and exit.

Commands:
install Install library
list List installed libraries
register Register new library
search Search for library
show Show details about installed library
uninstall Uninstall libraries
update Update installed libraries

26
Setup

user@workstation:~/nodemcu$ platformio lib search mqtt


Found 6 libraries:

[ ID ] Name Compatibility "Authors": Descri


ption
----------------------------------------------------------------
----------------
[ 89 ] PubSubClient arduino, atmelavr, espressif "Nick O'Le
ary": A client library for MQTT messaging. MQTT is a lightweight
messaging protocol ideal for small devices. This library allows
you to send and receive MQTT messages. It supports the latest M
QTT 3.1.1 protocol and can be configured to use the older MQTT 3
.1 if
[1092 ] Adafruit-MQTT arduino, atmelavr, espressif "Adafruit
Industries": MQTT library that supports the CC3000, FONA, ESP826
6, Yun, and generic Arduino Client hardware.
[ 537 ] espduino arduino, atmelavr, atmelsam, teensy "Tu
an PM": Wifi library (Chip ESP8266 Wifi SoC) using SLIP protocol
via Serial port
[ 555 ] Homie arduino, espressif "Marvin Roger": E
SP8266 framework for Homie, a lightweight MQTT convention for th
e IoT
[ 270 ] DimSwitch arduino, atmelavr, atmelsam, espressif
"Krzysztof": A library to control dimmable ballasts for fluoresc
ent light tubes.
[ 227 ] Esp8266Configuration arduino, espressif "Karsten Kuka
t": store and read configuration from SPIFFS (wifi ap, wifi stat
ion, mqtt ..)

[ 415 ] Blynk arduino, energia, mbed, wiringpi, atmel


avr, atmelsam, timsp430, titiva, nordicnrf51, espressif, native
"Volodymyr Shymanskyy": Build a smartphone app for your project
in minutes. Works with Arduino, ESP8266, Raspberry Pi, Intel Edi
son/Galileo, LinkIt ONE, Particle Core/Photon, Banana Pro, LeMak
er Guitar, Energia, MBED, LightBlue Bean, ...
[ 444 ] Buttons arduino, atmelavr, atmelsam, timsp430,
titiva, teensy, freescalekinetis, ststm32, nordicnrf51, nxplpc,
espressif, siliconlabsefm32 "Richard Miles": Handle different ty

27
Setup

pes of buttons and button events easily (touch, capacitive, push


)
[ 548 ] MySensors arduino, atmelavr, atmelsam, timsp430,
titiva, teensy, freescalekinetis, ststm32, nordicnrf51, nxplpc,
espressif, siliconlabsefm32 "MySensors": Home Automation Framewo
rk. Create your own wireless sensor mesh using NRF24L01+ and RFM
69 radios running on Arduino or ESP8266. Over-the-air updates an
d MySensors support in 16+ home automation controllers.
[ 550 ] ThingSpeak arduino, atmelavr, atmelsam, timsp430,
titiva, teensy, freescalekinetis, ststm32, nordicnrf51, nxplpc,
espressif, siliconlabsefm32 "MathWorks": ThingSpeak Communicatio
n Library for Arduino & ESP8266
[ 554 ] AnalogInput arduino, atmelavr, atmelsam, timsp430,
titiva, teensy, freescalekinetis, ststm32, nordicnrf51, nxplpc,
espressif, siliconlabsefm32 "John Ogle": Provides an easy way to
automatically calibrate an analog input on an Arduino board.
[ 555 ] Homie arduino, espressif "Marvin Roger": E
SP8266 framework for Homie, a lightweight MQTT convention for th
e IoT
[ 573 ] microcoap arduino, atmelavr, atmelsam, timsp430,
titiva, teensy, freescalekinetis, ststm32, nordicnrf51, nxplpc,
espressif, siliconlabsefm32 "Toby Jaffey": A small CoAP implemen
tation for microcontrollers
[ 563 ] WeatherStation arduino, espressif "Daniel Eichhorn"
: A wifi connected information display
[ 561 ] JsonStreamingParser arduino, atmelavr, atmelsam, timsp43
0, titiva, teensy, freescalekinetis, ststm32, nordicnrf51, nxplp
c, espressif, siliconlabsefm32 "Daniel Eichhorn": A very memory
efficient library to parse (large) JSON objects on embedded devi
ces
[1092 ] Adafruit-MQTT arduino, atmelavr, espressif "Adafruit
Industries": MQTT library that supports the CC3000, FONA, ESP826
6, Yun, and generic Arduino Client hardware.
[ 578 ] Sensors arduino, mbed, wiringpi, atmelavr, teen
sy, espressif, linux_arm "James Smith": Use I2C-connected sensor
s like accelerometers, gyroscopes, and barometers in your projec
ts, without knowing the intimate details about the actual device
connected.
[ 579 ] ArduRPC arduino, atmelavr, espressif "DinoTools"
: ArduRPC brings remote procedure calls to microcontrollers. The

28
Setup

protocol has been designed to be simple and flexible.


[ 575 ] tiny-http arduino, energia, mbed, libopencm3, spl
, wiringpi, atmelavr, atmelsam, timsp430, titiva, teensy, freesc
alekinetis, ststm32, nordicnrf51, nxplpc, espressif, siliconlabs
efm32, linux_arm "Celci.us Labs": A Tiny HTTP Server
[ 429 ] aREST arduino, atmelavr, atmelsam, teensy, es
pressif "marcoschwartz": RESTful API for Arduino using HTTP or S
erial communications
[ 124 ] RadioHead arduino, energia, atmelavr, atmelsam, t
imsp430, titiva, teensy, freescalekinetis, ststm32, nordicnrf51,
nxplpc, espressif, siliconlabsefm32, linux_arm, native "Mike Mc
Cauley": The RadioHead Packet Radio library which provides a com
plete object-oriented library for sending and receiving packetiz
ed messages via RF22/24/26/27/69, Si4460/4461/4463/4464, nRF24/n
RF905, SX1276/77/78, RFM95/96/97/98 and etc.

user@workstation:~/nodemcu$ platformio lib search -f mbed


Found 85 libraries:
...
user@workstation:~/nodemcu$ platformio lib search -p espressif
Found 73 libraries:

[ ID ] Name Compatibility "Authors": Descri


ption
----------------------------------------------------------------
----------------
[ 257 ] Adafruit-PCD8544 arduino, espressif "WereCatf": Espre
ssif ESP8266 port of the Adafruit PCD8544 library

user@workstation:~/nodemcu$ platformio lib install 6


Installing library [ 6 ]:
Downloading [####################################] 100%
Unpacking [####################################] 100%
The library #6 'XBee' has been successfully installed!

29
Setup

30
Led

Led

Code Writing

xe1gyq@jessie:~/nodemcu$ echo > src/main.ino


xe1gyq@jessie:~/nodemcu$ vi src/main.ino

#include "Arduino.h"

void setup()
{
pinMode(LED_BUILTIN, OUTPUT);
}

void loop()
{
digitalWrite(LED_BUILTIN, HIGH);
delay(500);
digitalWrite(LED_BUILTIN, LOW);
delay(500);
}

Code Execution

31
Led

xe1gyq@jessie:~/nodemcu$ platformio run --target upload


...
...
espcomm_send_command: receiving 2 bytes of data
writing flash
................................................................
................................................................
................................................................
..........................
starting app without reboot
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
espcomm_send_command: receiving 2 bytes of data
closing bootloader
========================= [SUCCESS] Took 29.27 seconds =========
================
xe1gyq@jessie:~/nodemcu$

32
Mqtt

Mqtt

xe1gyq@jessie:~/nodemcu$ platformio lib install 89


Installing library [ 89 ]:
Downloading [####################################] 100%
Unpacking [####################################] 100%
The library #89 'PubSubClient' has been successfully installed!
xe1gyq@jessie:~/nodemcu$

Code Writing

xe1gyq@jessie:~/nodemcu$ echo > src/main.ino


xe1gyq@jessie:~/nodemcu$ vi src/main.ino

/*
Basic ESP8266 MQTT example
This sketch demonstrates the capabilities of the pubsub library
in combination
with the ESP8266 board/library.

It connects to an MQTT server then:


- publishes "hello world" to the topic "outTopic" every two se
conds
- subscribes to the topic "inTopic", printing out any messages
it receives. NB - it assumes the received payloads are strin
gs not binary
- If the first character of the topic "inTopic" is an 1, switc
h ON the ESP Led,
else switch it off

It will reconnect to the server if the connection is lost using


a blocking
reconnect function. See the 'mqtt_reconnect_nonblocking' exampl
e for how to

33
Mqtt

achieve the same result without blocking the main loop.

To install the ESP8266 board, (using Arduino 1.6.4+):


- Add the following 3rd party board manager under "File -> Pre
ferences -> Additional Boards Manager URLs":
http://arduino.esp8266.com/stable/package_esp8266com_inde
x.json
- Open the "Tools -> Board -> Board Manager" and click install
for the ESP8266"
- Select your ESP8266 in "Tools -> Board"

*/

#include <ESP8266WiFi.h>
#include <PubSubClient.h>

// Update these with values suitable for your network.

const char* ssid = "........";


const char* password = "........";
const char* mqtt_server = "broker.mqtt-dashboard.com";

WiFiClient espClient;
PubSubClient client(espClient);
long lastMsg = 0;
char msg[50];
int value = 0;

void setup() {
pinMode(BUILTIN_LED, OUTPUT); // Initialize the BUILTIN_LE
D pin as an output
Serial.begin(115200);
setup_wifi();
client.setServer(mqtt_server, 1883);
client.setCallback(callback);
}

void setup_wifi() {

delay(10);

34
Mqtt

// We start by connecting to a WiFi network


Serial.println();
Serial.print("Connecting to ");
Serial.println(ssid);

WiFi.begin(ssid, password);

while (WiFi.status() != WL_CONNECTED) {


delay(500);
Serial.print(".");
}

Serial.println("");
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
}

void callback(char* topic, byte* payload, unsigned int length) {


Serial.print("Message arrived [");
Serial.print(topic);
Serial.print("] ");
for (int i = 0; i < length; i++) {
Serial.print((char)payload[i]);
}
Serial.println();

// Switch on the LED if an 1 was received as first character


if ((char)payload[0] == '1') {
digitalWrite(BUILTIN_LED, LOW); // Turn the LED on (Note t
hat LOW is the voltage level
// but actually the LED is on; this is because
// it is acive low on the ESP-01)
} else {
digitalWrite(BUILTIN_LED, HIGH); // Turn the LED off by mak
ing the voltage HIGH
}

35
Mqtt

void reconnect() {
// Loop until we're reconnected
while (!client.connected()) {
Serial.print("Attempting MQTT connection...");
// Attempt to connect
if (client.connect("ESP8266Client")) {
Serial.println("connected");
// Once connected, publish an announcement...
client.publish("outTopic", "hello world");
// ... and resubscribe
client.subscribe("inTopic");
} else {
Serial.print("failed, rc=");
Serial.print(client.state());
Serial.println(" try again in 5 seconds");
// Wait 5 seconds before retrying
delay(5000);
}
}
}
void loop() {

if (!client.connected()) {
reconnect();
}
client.loop();

long now = millis();


if (now - lastMsg > 2000) {
lastMsg = now;
++value;
snprintf (msg, 75, "hello world #%ld", value);
Serial.print("Publish message: ");
Serial.println(msg);
client.publish("outTopic", msg);
}
}

Code Execution

36
Mqtt

xe1gyq@jessie:~/nodemcu$ platformio run --target upload

37
Blynk

Blynk
Create an app for any connected project or product based on Arduino,
Raspberry Pi, ESP8266, SparkFun, and other hardware.

Blynk Homepage
Blynk Getting Started
Blynk Community

Library Installation

xe1gyq@jessie:~/nodemcu$ platformio lib search *blynk*


Found 1 libraries:

[ ID ] Name Compatibility "Authors": Descri


ption
----------------------------------------------------------------
----------------------------------------------------------
[ 415 ] Blynk arduino, energia, mbed, wiringpi, atmel
avr, atmelsam, timsp430, titiva, nordicnrf51, espressif, native
"Volodymyr Shymanskyy": Build a smartphone app for your project
in minutes. Works with Arduino, ESP8266, Raspberry Pi, Intel Edi
son/Galileo, LinkIt ONE, Particle Core/Photon, Banana Pro, LeMak
er Guitar, Energia, MBED, LightBlue Bean, ...
xe1gyq@jessie:~/nodemcu$ platformio lib install 415
Installing library [ 415 ]:
Downloading [####################################] 100%
Unpacking [####################################] 100%
The library #415 'Blynk' has been successfully installed!

Code Writing

xe1gyq@jessie:~/nodemcu$ echo > src/main.ino


xe1gyq@jessie:~/nodemcu$ vi src/main.ino

38
Blynk

#define BLYNK_PRINT Serial


#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

char auth[] = "80c754ba45644ec4b4b402eb8ae10163";

void setup()
{
Serial.begin(9600);
Blynk.begin(auth, "INFINITUMfjph", "1c3889dfdb");
}

void loop()
{
Blynk.run();
}

Code Execution

xe1gyq@jessie:~/nodemcu$ platformio run --target upload


espcomm_send_command: receiving 2 bytes of data
writing flash
................................................................
................................................................
................................................................
..............................................
starting app without reboot
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
espcomm_send_command: receiving 2 bytes of data
closing bootloader
============================================== [SUCCESS] Took 34
.32 seconds ==============================================
xe1gyq@jessie:~/nodemcu$

39
Blynk

40
Structure IoT Development Platform

Structure IoT Development Platform


BUILD REAL-TIME IOT SOLUTIONS WITH EASE. Now you can connect the
unconnected. With the Structure IoT developer platform your devices and
data come together to create the Internet of Things solution you need.

Structure IoT Development Platform Homepage


Structure IoT Development Platform Kit

PlatformIO Library

[ 253 ] Structure arduino, atmelavr, atmelsam, timsp430,


titiva, teensy, freescalekinetis, ststm32, nordicnrf51, nxplpc,
espressif, siliconlabsefm32, linux_arm, native "Structure": Ardu
ino SDK for connecting embedded devices to the Structure IoT dev
eloper platform
...
xe1gyq@jessie:~/nodemcu$ platformio lib install 253
Installing library [ 253 ]:
Downloading [####################################] 100%
Unpacking [####################################] 100%
The library #253 'Structure' has been successfully installed!
xe1gyq@jessie:~/nodemcu$

Welcome
Welcome

CREATE APPLICATION. Devices are registered, and workflows are created,


all within the context of an application. First, lets name your new application.

Applications
Create Application
Name: MyNodeMCU

41
Structure IoT Development Platform

New Application

DEVICES, DEVICES, DEVICES! This is your applications device list. From


here you can view and filter all of your various things. Add a device now and
start building!

42
Python

MicroPython
MicroPython - a lean and efficient Python implementation for microcontrollers
and constrained systems MicroPython Github

MicroPython Documentation ESP8266


MicroPython Documentation
MicroPython tutorial for ESP8266

root@host:~# apt-get install libffi-dev pkg-config

user@host:~$ git clone https://github.com/micropython/micropytho


n.git
user@host:~$ cd micropython/

user@host:~$ ls
ACKNOWLEDGEMENTS docs lib pic16bit teensy zep
hyr
bare-arm drivers LICENSE py tests
cc3200 esp8266 logo qemu-arm tools
CODECONVENTIONS.md examples minimal README.md unix
CONTRIBUTING.md extmod mpy-cross stmhal windows

43
x86

Micro Python x86

user@host:~$ cd micropython/unix

user@host:~$ make axtls


user@host:~$ make

user@host:~$ ./micropython

>>>
MicroPython v1.8.7-781-g299c0a39 on 2017-05-21; linux version
Use Ctrl-D to exit, Ctrl-E for paste mode
>>> print("hi")
hi
>>>

Micro Python Pip

user@host:~$ ./micropython -m upip install micropython-pystone


Installing to: /home/xe1gyq/.micropython/lib/
Warning: pypi.python.org SSL certificate is not validated
Installing micropython-pystone 3.4.2-2 from https://pypi.python.
org/packages/13/00/8f7c7ab316e8850ea3273956e1370d008cfd36697dec2
492388d3b000335/micropython-pystone-3.4.2-2.tar.gz
user@host:~$

44
Esp8266

Micro Python ESP8266

user@host:~$ export PATH=/home/xe1gyq/NodeMcu/esp-open-sdk/xtens


a-lx106-elf/bin:$PATH

user@host:~$ cd micropython/esp8266
user@host:~$ make

...
LINK build/firmware.elf
text data bss dec hex filename
572052 1096 64360 637508 9ba44 build/fir
mware.elf
Create build/firmware-combined.bin
esptool.py v1.2
('flash ', 36256)
('padding ', 608)
('irom0text', 536940)
('total ', 573804)
('md5 ', '9c0e81ca947e91beae3e3b7cec9df97f')

user@host:~$ cd unix/
user@host:~$ make axtls

Micro Python Deploy

user@host:~$ export PATH=/home/xe1gyq/NodeMcu/esp-open-sdk/xtens


a-lx106-elf/bin:$PATH

45
Esp8266

user@host:~$ make PORT=/dev/ttyUSB0 deploy


Use make V=1 or set BUILD_VERBOSE in your environment to increas
e build verbosity.
Writing build/firmware-combined.bin to the board
#@esptool.py --port /dev/ttyUSB0 write_flash 0 build/firmware-co
mbined.bin
Connecting...
Erasing flash...
Took 0.87s to erase flash block
Wrote 51200 bytes at 0x00000000 in 4.9 seconds (82.9 kbit/s)...
Erasing flash...
Took 1.58s to erase flash block
Wrote 282624 bytes at 0x00010000 in 27.4 seconds (82.5 kbit/s)..
.

Leaving...

user@host:~$ su
password
root@host:~# minicom -D /dev/ttyUSB0

<reset>

MicroPython v1.8.7-781-g299c0a39 on 2017-05-21; ESP module with


ESP8266
Type "help()" for more information.
>>> print("hi")
hi
>>>

Micro Python Execution

46
Esp8266

MicroPython v1.8.7-781-g299c0a39 on 2017-05-21; ESP module with


ESP8266
Type "help()" for more information.
>>> import machine
>>> machine.freq()
80000000
>>> machine.freq(160000000)
>>> import esp
>>> esp.osdebug(None)
>>> esp.osdebug(0)

47
Esp8266

>>> wlan = network.WLAN(network.STA_IF)



>>> wlan.active(True)

mode : sta(5c:cf:7f:dc:41:fa) + softAP(5e:cf:7f:dc:41:fa)

#5 ets_task(4020ed88, 28, 3fff9eb0, 10)

add if0

>>> wlan.scan()

scandone

[(b'INFINITUM09E845', b'0\x91\x8f\t\xe8E', 1, -75, 3, 0), (b'INF
INITUMfjph', b']
>>> wlan.isconnected()
False
>>> wlan.connect('INFINITUMfjph', '1c2899dfda')
>>> scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 2
cnt

connected with INFINITUMfjph, channel 2


dhcp client start...
ip:192.168.1.71,mask:255.255.255.0,gw:192.168.1.254

>>> wlan.ifconfig()

('192.168.1.71', '255.255.255.0', '192.168.1.254', '8.8.8.8')

>>>

48
Esp8266

Micro Python Pip

>>> import upip



>>> upip.install("micropython-struct")

Installing to: /lib/

Installing to: /lib/

Warning: pypi.python.org SSL certificate is not validated

Installing micropython-struct 0.1.1 from https://pypi.python.org
/packages/5d/eez
>>> upip.install("micropython-pystone")

Installing to: /lib/

Installing micropython-pystone 3.4.2-2 from https://pypi.python.
org/packages/13z

49
Espressif

Espressif
Espressifs SDKs
Espressif Github
Tutorial for Beginners

50
NodeMCU

NodeMCU
NodeMCU is an eLua based firmware for the ESP8266 WiFi SOC from
Espressif. The NodeMCU firmware is a companion project to the popular
NodeMCU dev kits, ready-made open source development boards with
ESP8266-12E chips. Documentation

NodeMCU is an open source IoT platform. It uses the Lua scripting language.
It is based on the eLua project, and built on the ESP8266 SDK 1.4. It uses
many open source projects, such as lua-cjson, and spiffs. It includes firmware
which runs on the ESP8266 Wi-Fi SoC, and hardware which is based on the
ESP-12 module. Wikipedia

Connect Things EASY. An open-source firmware and development kit that


helps you to prototype your IOT product within a few Lua script lines.
NodeMCU Homepage

NodeMCU Github
Lua based interactive firmware for mcu like esp8266
NodeMCU Home Page
NodeMCU github Page
Getting Started with ESP8266 WiFi Transceiver (Review)
ESP8266 core for Arduino

NodeMCU Custom Builds


NodeMCU custom builds. You customize your NodeMCU firmware and we
build it. Just for you. On the spot. Homepage

Lua

51
NodeMCU

Lua is a powerful, fast, lightweight, embeddable scripting language.

Lua combines simple procedural syntax with powerful data description


constructs based on associative arrays and extensible semantics. Lua is
dynamically typed, runs by interpreting bytecode for a register-based virtual
machine, and has automatic memory management with incremental garbage
collection, making it ideal for configuration, scripting, and rapid prototyping.

Lua home page


ESP8266 Web Server Tutorial

ESPlorer
ESPlorer

52
Libraries

Libraries

Arest
The aREST framework is a complete solution to build powerful RESTful
applications based on the Arduino & the Raspberry Pi platforms. It can handle
all kind of communications via Serial, WiFi, Ethernet, and much more. It
includes libraries for boards themselves, like Arduino boards, and also server-
side code to handle the communications between a server and remote
devices. The aREST framework is of course completely open-source and free
to use. Homepage

53
Projects

Projects

54
WiFi

WiFi
Taken from Sabas1080 Github

Search

/*
*MASLOW: an Open WiFi Detector with ESP8266
*based in Adafruit https://learn.adafruit.com/wifi-hotspot-find
er-adafruit-pro-trinket-cc3000
* by Andres Sabas
* The Inventor's House Hackerspace
* 19 sept 2015
*/

#include "ESP8266WiFi.h"

const int sleepTimeS = 30;

void sleep_now(){
Serial.print(F("Sleeping..."));
ESP.deepSleep(sleepTimeS * 1000000);
}

void setup() {
Serial.begin(115200);
WiFi.mode(WIFI_STA);
WiFi.disconnect();
delay(100);
pinMode(BUILTIN_LED, OUTPUT);
Serial.println("Setup done");
}

void loop() {
uint8_t sec;
analogWrite(BUILTIN_LED, 10);
Serial.print(F("Scanning..."));

55
WiFi

int n = WiFi.scanNetworks(); // WiFi.scanNetworks will return


the number of networks found
Serial.println(F("scan done"));
if (n == 0)
Serial.println(F("no networks found"));
else
{
Serial.print(n); Serial.print(F(" network"));
if(n > 1) Serial.print('s');
Serial.println(F(" found:"));
for (int i = 0; i < n; ++i)
{
int sec = WiFi.encryptionType(i);

// Print SSID and RSSI for each network found


Serial.print(i + 1);
Serial.print(": ");
Serial.print(WiFi.SSID(i));
Serial.print(" (");
Serial.print(WiFi.RSSI(i));
Serial.print(")");
Serial.println(sec);
delay(10);

if((sec == ENC_TYPE_NONE || sec == ENC_TYPE_WEP) && (WiF


i.RSSI(i) > -95)) {
analogWrite(BUILTIN_LED, 1023);
delay(1000);
Serial.println("Not security");
sleep_now();
}
}
}

Connect

56
WiFi

#include <ESP8266WiFi.h>
#include <ESP8266WiFiMulti.h>

ESP8266WiFiMulti WiFiMulti;

void setup() {
Serial.begin(115200);
delay(10);

WiFiMulti.addAP("INFINITUMfdca", "1d8856da87");

Serial.println();
Serial.println();
Serial.print("Wait for WiFi... ");

while(WiFiMulti.run() != WL_CONNECTED) {
Serial.print(".");
delay(500);
}

Serial.println("");
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());

delay(500);
}

void loop() {
const uint16_t port = 80;
const char * host = "192.168.1.1";

Serial.print("connecting to ");
Serial.println(host);

WiFiClient client;

if (!client.connect(host, port)) {

57
WiFi

Serial.println("connection failed");
Serial.println("wait 5 sec...");
delay(5000);
return;
}

client.print("Send this data to server");

String line = client.readStringUntil('\r');


client.println(line);

Serial.println("closing connection");
client.stop();

Serial.println("wait 5 sec...");
delay(5000);
}

58
Mqtt

Mqtt

/*
Basic ESP8266 MQTT example

This sketch demonstrates the capabilities of the pubsub library


in combination
with the ESP8266 board/library.

It connects to an MQTT server then:


- publishes "hello world" to the topic "outTopic" every two se
conds
- subscribes to the topic "inTopic", printing out any messages
it receives. NB - it assumes the received payloads are strin
gs not binary
- If the first character of the topic "inTopic" is an 1, switc
h ON the ESP Led,
else switch it off

It will reconnect to the server if the connection is lost using


a blocking
reconnect function. See the 'mqtt_reconnect_nonblocking' exampl
e for how to
achieve the same result without blocking the main loop.

To install the ESP8266 board, (using Arduino 1.6.4+):


- Add the following 3rd party board manager under "File -> Pre
ferences -> Additional Boards Manager URLs":
http://arduino.esp8266.com/stable/package_esp8266com_inde
x.json
- Open the "Tools -> Board -> Board Manager" and click install
for the ESP8266"
- Select your ESP8266 in "Tools -> Board"

*/

#include <ESP8266WiFi.h>

59
Mqtt

#include <PubSubClient.h>

const char* ssid = "INFINITUMfjph";


const char* password = "1d34df65a4";
const char* mqtt_server = "broker.mqtt-dashboard.com";

WiFiClient espClient;
PubSubClient client(espClient);
long lastMsg = 0;
char msg[50];
int value = 0;

void setup_wifi() {

delay(10);
Serial.println();
Serial.print("Connecting to ");
Serial.println(ssid);

WiFi.begin(ssid, password);

while (WiFi.status() != WL_CONNECTED) {


delay(500);
Serial.print(".");
}

Serial.println("");
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
}

void callback(char* topic, byte* payload, unsigned int length) {


Serial.print("Message arrived [");
Serial.print(topic);
Serial.print("] ");
for (int i = 0; i < length; i++) {
Serial.print((char)payload[i]);
}
Serial.println();

60
Mqtt

if ((char)payload[0] == '1') {
digitalWrite(BUILTIN_LED, LOW);
} else {
digitalWrite(BUILTIN_LED, HIGH);
}
}

void reconnect() {
while (!client.connected()) {
Serial.print("Attempting MQTT connection...");
if (client.connect("ESP8266Client")) {
Serial.println("connected");
client.publish("outTopic", "hello world");
client.subscribe("inTopic");
} else {
Serial.print("failed, rc=");
Serial.print(client.state());
Serial.println(" try again in 5 seconds");
delay(5000);
}
}
}

void setup() {
pinMode(BUILTIN_LED, OUTPUT); // Initialize the BUILTIN_LE
D pin as an output
Serial.begin(115200);
setup_wifi();
client.setServer(mqtt_server, 1883);
client.setCallback(callback);
}

void loop() {

if (!client.connected()) {
reconnect();
}
client.loop();

61
Mqtt

long now = millis();


if (now - lastMsg > 2000) {
lastMsg = now;
++value;
snprintf (msg, 75, "hello world #%ld", value);
Serial.print("Publish message: ");
Serial.println(msg);
client.publish("outTopic", msg);
}
}

62
Adafruit

Adafruit

63
WebServer

WebServer

Authentication

#include <ESP8266WiFi.h>
#include <ESP8266mDNS.h>
#include <ArduinoOTA.h>
#include <ESP8266WebServer.h>

const char* ssid = "INFINITUMfjph";


const char* password = "1d66df9245";

ESP8266WebServer server(80);

const char* www_username = "admin";


const char* www_password = "esp8266";

void setup() {
Serial.begin(115200);
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, password);
if(WiFi.waitForConnectResult() != WL_CONNECTED) {
Serial.println("WiFi Connect Failed! Rebooting...");
delay(1000);
ESP.restart();
}
ArduinoOTA.begin();

server.on("/", [](){
if(!server.authenticate(www_username, www_password))
return server.requestAuthentication();
server.send(200, "text/plain", "Login OK");
});
server.begin();

Serial.print("Open http://");

64
WebServer

Serial.print(WiFi.localIP());
Serial.println("/ in your browser to see it working");
}

void loop() {
ArduinoOTA.handle();
server.handleClient();
}

Serial

Open http://192.168.1.74/ in your browser to see it working

Web Browser

Username:
Password:

Login OK

HelloServer

#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
#include <ESP8266mDNS.h>

const char* ssid = "INFINITUMfjph";


const char* password = "1d66df9245";

ESP8266WebServer server(80);

const int led = BUILTIN_LED;

65
WebServer

void handleRoot() {
digitalWrite(led, 1);
server.send(200, "text/plain", "hello from esp8266!");
digitalWrite(led, 0);
}

void handleNotFound(){
digitalWrite(led, 1);
String message = "File Not Found\n\n";
message += "URI: ";
message += server.uri();
message += "\nMethod: ";
message += (server.method() == HTTP_GET)?"GET":"POST";
message += "\nArguments: ";
message += server.args();
message += "\n";
for (uint8_t i=0; i<server.args(); i++){
message += " " + server.argName(i) + ": " + server.arg(i) +
"\n";
}
server.send(404, "text/plain", message);
digitalWrite(led, 0);
}

void setup(void){
pinMode(led, OUTPUT);
digitalWrite(led, 0);
Serial.begin(115200);
WiFi.begin(ssid, password);
Serial.println("");

// Wait for connection


while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.print("Connected to ");
Serial.println(ssid);
Serial.print("IP address: ");

66
WebServer

Serial.println(WiFi.localIP());

if (MDNS.begin("esp8266")) {
Serial.println("MDNS responder started");
}

server.on("/", handleRoot);

server.on("/inline", [](){
server.send(200, "text/plain", "this works as well");
});

server.onNotFound(handleNotFound);

server.begin();
Serial.println("HTTP server started");
}

void loop(void){
server.handleClient();
}

Serial

...
Connected to INFINITUMfjph
IP address: 192.168.1.74
MDNS responder started
HTTP server started

Web Browser

hello from esp8266!

this works as well

67
WebServer

68
IBM Watson IoT

IBM Watson IoT

69
Sandbox

Sandbox
http://www.wemos.cc/tutorial/get_started_in_nodemcu.html
ESP8266 Wiki
https://www.gitbook.com/book/smartarduino/user-manual-for-esp-12e-
devkit/details
http://www.instructables.com/id/ESP8266-HTTP-IO-Server/
Olimex IoT Firmware
https://github.com/squix78/esp8266-projects/blob/master/arduino-
ide/thingspeak-data-logger/thingspeak-data-logger.ino
http://frightanic.com/computers/build-nodemcu-firmware-for-the-esp8266/
http://www.allaboutcircuits.com/projects/guts-of-the-iot-part-1-building-
nodemcu-from-source-for-the-esp8266/
http://blog.cudmore.io/post/2016/02/13/Programming-an-arduino-with-
platformio/?
utm_content=buffere8465&utm_medium=social&utm_source=twitter.com&ut
m_campaign=buffer
http://www.esp8266.nu/index.php/ESPEasy
http://www.wemos.cc/

ESP8266
ESP-12E

http://www.esp8266.com/wiki/doku.php#getting_started
https://learn.adafruit.com/adafruit-huzzah-esp8266-breakout/using-arduino-
ide
https://github.com/nodemcu
http://hanneslehmann.github.io/2014/12/ESP8266Module/
https://espressif.com/products/hardware/esp8266ex/overview/
https://mcuoneclipse.com/2014/10/15/cheap-and-simple-wifi-with-esp8266-
for-the-frdm-board/
https://scargill.wordpress.com/?s=esp8266

70
Sandbox

Services
IoT platform for Makers

http://jumpwire.io/
https://github.com/knolleary/pubsubclient/blob/master/examples/mqtt_esp826
6/mqtt_esp8266.ino

ESPlorer

java jar ESPlorer.jar

https://github.com/4refr0nt/ESPlorer
http://randomnerdtutorials.com/download/

MQTT
ESP8266
ESP8266 Relay Board Homepage
ESP8266 Relay Board Github
A simple connected object with NodeMCU and MQTT

Hardware Node-MCU Motor


http://nodemcu-motor.doit.am/

71

You might also like