Slide 1

Slide 1 text

LTKA Labs ESP8266 Basics Eueung Mulyana http://eueung.github.io/ET3010/esp8266 ET-3010 | Attribution-ShareAlike CC BY-SA 1 / 44

Slide 2

Slide 2 text

Outline Short Intro ESP-01 Blynk 2 / 44

Slide 3

Slide 3 text

Short Intro 3 / 44

Slide 4

Slide 4 text

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 1 TX0 RX0 RESET 13 12 11 ETH 9 8 7 6 5 SDCS 3 2 0 1 TX 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

Slide 5

Slide 5 text

Sometimes... network wires & switch ports are not available .. In some conditions, they are not an option at all! 5 / 44

Slide 6

Slide 6 text

6 / 44 Enter ESP8266 Small Powerful Cheap

Slide 7

Slide 7 text

7 / 44

Slide 8

Slide 8 text

8 / 44 Arduino and WiFi Official Arduino WiFi Shield EUR 69 + VAT Sparkfun CC3000 Shield USD 40 Adafruit CC3000 Module USD 35

Slide 9

Slide 9 text

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

Slide 10

Slide 10 text

10 / 44 ESP8266 Series ESP-xx

Slide 11

Slide 11 text

11 / 44 Pinout ESP-01

Slide 12

Slide 12 text

12 / 44 Pinout ESP-12

Slide 13

Slide 13 text

13 / 44 ESP-01 ESP-12F + Breakout IDR 50k & IDR 90k

Slide 14

Slide 14 text

14 / 44 Three Alternatives..

Slide 15

Slide 15 text

15 / 44 Actually More ... Dev Boards Adafruit Huzzah Sparkfun MOD-WIFI- ESP8266-DEV NodeMCU v1 Around USD 10 or less

Slide 16

Slide 16 text

16 / 44

Slide 17

Slide 17 text

17 / 44

Slide 18

Slide 18 text

ESP-01 18 / 44

Slide 19

Slide 19 text

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

Slide 20

Slide 20 text

20 / 44 Wiring Example Normal Operation

Slide 21

Slide 21 text

21 / 44 Wiring Example Flash / Program

Slide 22

Slide 22 text

22 / 44 Wiring Example Pullup Resistors

Slide 23

Slide 23 text

23 / 44 Wiring Example Decoupling Capacitors

Slide 24

Slide 24 text

24 / 44 Wiring Example Bypass Capacitors

Slide 25

Slide 25 text

Let's Start ... 25 / 44

Slide 26

Slide 26 text

26 / 44

Slide 27

Slide 27 text

27 / 44

Slide 28

Slide 28 text

28 / 44

Slide 29

Slide 29 text

Serial Monitor: AT | AT+GMR | AT+CWLAP 29 / 44

Slide 30

Slide 30 text

Blynk 30 / 44

Slide 31

Slide 31 text

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.

Slide 32

Slide 32 text

32 / 44 Download App Create Account

Slide 33

Slide 33 text

33 / 44 Create New Project Remember / Email Auth Token

Slide 34

Slide 34 text

34 / 44 Add (Widget Box) Select Button

Slide 35

Slide 35 text

35 / 44 Edit Title Select Output Pin (D13) Mode (Switch)

Slide 36

Slide 36 text

36 / 44 Switch TX - RX Wire Remove RST - GND Wire LED on Pin 13 (Better with Current Limiting Resistor)

Slide 37

Slide 37 text

37 / 44

Slide 38

Slide 38 text

38 / 44 Download Blynk Library Then Install : Blynk BlynkESP8266_HardSer

Slide 39

Slide 39 text

Write Some Codes Then Upload Don't forget to temporarily release the RX pin! # d e f i n e B L Y N K _ P R I N T S e r i a l # i n c l u d e < E S P 8 2 6 6 _ H a r d S e r . h > # i n c l u d e < B l y n k S i m p l e S h i e l d E s p 8 2 6 6 _ H a r d S e r . h > # d e f i n e E s p S e r i a l S e r i a l E S P 8 2 6 6 w i f i ( E s p S e r i a l ) ; c h a r a u t h [ ] = " 7 0 1 f 5 e 2 2 6 3 4 9 4 7 8 3 b b 7 e e 9 a 3 6 f c 1 2 3 4 5 " ; v o i d s e t u p ( ) { S e r i a l . b e g i n ( 1 1 5 2 0 0 ) ; d e l a y ( 1 0 ) ; E s p S e r i a l . b e g i n ( 1 1 5 2 0 0 ) ; d e l a y ( 1 0 ) ; B l y n k . b e g i n ( a u t h , w i f i , " l k 8 f m " , " 0 1 2 3 4 5 6 7 8 9 " ) ; } v o i d l o o p ( ) { B l y n k . r u n ( ) ; } 39 / 44

Slide 40

Slide 40 text

Blynk App Go to Dashboard Play Push the Button 40 / 44

Slide 41

Slide 41 text

41 / 44

Slide 42

Slide 42 text

Refs 42 / 44

Slide 43

Slide 43 text

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

Slide 44

Slide 44 text

END Eueung Mulyana http://eueung.github.io/ET3010/esp8266 ET-3010 | Attribution-ShareAlike CC BY-SA 44 / 44