KEMBAR78
Esp8266 basics | PDF
LTKA Labs
ESP8266 Basics
Eueung Mulyana
http://eueung.github.io/ET3010/esp8266
ET-3010 | Attribution-ShareAlike CC BY-SA
1 / 44
Outline
Short Intro
ESP-01
Blynk
2 / 44
Short Intro
3 / 44
Previously ...
 
13
12
11
10
9
8
7
6
5
4
3
2
L
5V
A0
ANALOG IN
AREF
1
GND
TX
RX
RESET
3V3
A1
A2
A3
A4
A5
VIN
GND
GND
DIGITAL (PWM= )
Arduino
TM
IOREF
ICSP
ICSP2
ON
POWER
0
1TX0
RX0
RESET
13
12
11
ETH
9
8
7
6
5
SDCS
3
2
0
1TX
RX
AREF
GND
5V
A0
ANALOG IN
TX
RX
RESET
3V3
A1
A2
A3
A4
A5
VIN
GND
GND
DIGITAL (PWM SPI )
SCL SDA
<
IOREF
ICSP
CS
< <
To Get Network Access: UNO + Ethernet Shield
4 / 44
Sometimes... network wires & switch ports
are not available ..
In some conditions, they are not an option at all!
5 / 44
6 / 44
Enter
ESP8266
Small
Powerful
Cheap
7 / 44
8 / 44
Arduino and WiFi
Official Arduino WiFi Shield
EUR 69 + VAT
Sparkfun CC3000 Shield
USD 40
Adafruit CC3000 Module
USD 35
ESP8266
Developed by Espressif System
Low Cost
Part Number is ESP8266EX
20+ M Chip Sold
5000 Active Developers
3.3V - 215mA (measurement: peak ~430 mA)
CPU: 32-bit, 80MHz (or 160 MHz), Tensilica
Xtensa Core
Wi-Fi 802.11b/g/n (Station or AP), WEP/WPA/WPA2
Timers, Deep Sleep Mode
I/CRAM 32-64KB, DRAM 80-96KB
External QPI Flash (200KB SDK, prev. 512 KB / 4Mbit, new
min. 1 MB/8Mbit)
GPIO (2-16)
SPI, I2C, I2S, UART
10-Bit ADC
9 / 44
10 / 44
ESP8266 Series
ESP-xx
11 / 44
Pinout
ESP-01
12 / 44
Pinout
ESP-12
13 / 44
ESP-01
ESP-12F + Breakout
IDR 50k & IDR 90k
14 / 44
Three Alternatives..
15 / 44
Actually More ...
Dev Boards
Adafruit Huzzah
Sparkfun MOD-WIFI-
ESP8266-DEV
NodeMCU v1
Around USD 10 or less
16 / 44
17 / 44
ESP-01
18 / 44
19 / 44
ESP-01
2x4 DIL Header
Integrated Antenna
Integrated LED (VCC, TXD)
1MB/8Mbit Flash (2015, Black)
Operating
VCC: 3.3V (av. active 200mA, peak see prev.)
IO & UART are not 5V Tolerant
CH_PD must be Pulled High
20 / 44
Wiring
Example
Normal Operation
21 / 44
Wiring
Example
Flash / Program
22 / 44
Wiring
Example
Pullup Resistors
23 / 44
Wiring
Example
Decoupling
Capacitors
24 / 44
Wiring
Example
Bypass Capacitors
Let's Start ...
25 / 44
26 / 44
27 / 44
28 / 44
 
Serial Monitor: AT | AT+GMR | AT+CWLAP
29 / 44
Blynk
30 / 44
31 / 44
Blynk is a Platform with iOS and Android apps
to control Arduino, Raspberry Pi and the likes
over the Internet.
It's a digital dashboard where you can build a
graphic interface for your project by simply
dragging and dropping widgets.
Blynk is not tied to some specific board or
shield. Instead, it's supporting hardware of
your choice. Whether your Arduino or
Raspberry Pi is linked to the Internet over Wi-
Fi, Ethernet or this new ESP8266 chip, Blynk
will get you online and ready for the Internet
Of Your Things.
32 / 44
Download App
Create Account
33 / 44
Create New Project
Remember / Email Auth
Token
34 / 44
Add (Widget Box)
Select Button
35 / 44
Edit Title
Select Output Pin
(D13)
Mode (Switch)
36 / 44
Switch TX - RX Wire
Remove RST - GND Wire
LED on Pin 13 (Better
with Current Limiting
Resistor)
37 / 44
38 / 44
Download Blynk
Library
Then Install :
Blynk
BlynkESP8266_HardSer
Write Some Codes
Then Upload
Don't forget to temporarily release the RX
pin!
#defineBLYNK_PRINTSerial
#include<ESP8266_HardSer.h>
#include<BlynkSimpleShieldEsp8266_HardSer.h>
#defineEspSerialSerial
ESP8266wifi(EspSerial);
charauth[]="701f5e2263494783bb7ee9a36fc12345";
voidsetup()
{
Serial.begin(115200);
delay(10);
EspSerial.begin(115200);
delay(10);
Blynk.begin(auth,wifi,"lk8fm","0123456789");
}
voidloop()
{
Blynk.run();
}
39 / 44
Blynk App
Go to Dashboard
Play
Push the Button
40 / 44
41 / 44
Refs
42 / 44
Refs
1. Zhu Baoshi - Build WiFi Gadgets Using ESP8266, GeekCamp.SG 2015
2. Tom Tobback, Cassiopeia - ESP8266+Arduino, ESP8266+Arduino workshop
2015
3. Burak Aydin - Hack The ESP8266
4. Pighixxx - Boards - Pinout
5. Tuanpmt/Espduino - ESP8266 Network Client for Arduino
6. Internet of Home Things - 4 Ways to Eliminate ESP8266 Resets
7. Update the Firmware in Your ESP8266 Wi-Fi Module
8. ESP8266 Support WIKI - Getting-Started-with-the-ESP8266
9. sleemanj/ESP8266_Simple - A simple Arduino library to perform HTTP
operations on the ESP8266 Wifi Device
10. DIY ESP8266 ESP-01 Programing / Test board
11. Blynk
43 / 44
END
Eueung Mulyana
http://eueung.github.io/ET3010/esp8266
ET-3010 | Attribution-ShareAlike CC BY-SA
44 / 44

Esp8266 basics