background image

www.handsontec.com 

 

ESP8266 WiFi 

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

 

The  ESP8266  is  the  name  of  a  micro  controller  designed  by  Espressif  Systems.  The  
ESP8266  itself  is  a  self-contained  WiFi  networking  solution  offering  as  a  bridge  from 
existing micro controller to WiFi and is also capable of running self-contained applications. 

This module comes with a built in USB connector and a rich assortment of pin-outs. With a 
micro USB cable, you can connect NodeMCU devkit to your laptop and flash it without any 
trouble, just like Arduino. It is also immediately breadboard friendly. 

 
 
 
 
 
 
 
 
 
 
 
 
 
 

 

 

 

Содержание ESP8266 WiFi

Страница 1: ...tion offering as a bridge from existing micro controller to WiFi and is also capable of running self contained applications This module comes with a built in USB connector and a rich assortment of pin...

Страница 2: ...266 Support 5 Blink Test 7 Connecting via WiFi 9 4 Flashing NodeMCU Firmware on the ESP8266 using Windows 12 Parts Required 12 Pin Assignment 12 Wiring 13 Downloading NodeMCU Flasherfor Windows 13 Fla...

Страница 3: ...512K normal Integrated TCP IP protocol stack Processor Tensilica L106 32 bit Processor speed 80 160MHz RAM 32K 80K GPIOs 17 multiplexed with other functions Analog to Digital 1 input with 1024 step re...

Страница 4: ...o install ESP8266 library to work in Arduino IDE environment Install the Arduino IDE 1 6 4 or greater Download Arduino IDE from Arduino cc 1 6 4 or greater don t use 1 6 2 or lower version You can use...

Страница 5: ...Install button to install the ESP8266 library package Once installation completed close and re open Arduino IDEfor ESP8266 library to take effect Setup ESP8266Support Whenyou verestartedArduinoIDE sel...

Страница 6: ...eedisagoodplacetostart lateronyoucantryhigherspeedsbut115200isagood safe place tostart Gotoyour Windows Device Manager tofind out which Com Port USB Serial CH340 isassigned to Selectthe matching COM s...

Страница 7: ...proceed the above Com Port setting The CH340 driver can be download from the below site https github com nodemcu nodemcu devkit tree master Drivers Blink Test We ll begin with the simple blink test E...

Страница 8: ...Whenyoureleasethe RST button theblueindication willblink once thismeansitsreadyto bootload Once the ESP board is in bootload mode upload the sketch via the IDE Figure 3 2 Figure3 1 Connection diagram...

Страница 9: ...module The sketch will start immediately you ll see the LED blinking Hooray Connecting viaWiFi OK once you ve got the LED blinking let s go straight to the fun part connecting to a webserver Create a...

Страница 10: ...rial println host Use WiFiClient class to create TCP connections WiFiClient client const int httpPort 80 if client connect host httpPort Serial println connection failed return We now create a URI for...

Страница 11: ...en up the IDE serial console at 115200 baud to see the connection and webpage printout That s it pretty easy right This section is just to get you started and test out your module 11 www handsontec co...

Страница 12: ...tafewlinesofcodeyoucanestablishaWiFiconnection control the ESP8266 GPIOs turning your ESP8266 into a web server and a lot more In this tutorial we are going to use another ESP8266 module with pin head...

Страница 13: ...pply ground Downloading NodeMCU Flasher for Windows After wiring your circuit you have to download the NodeMCU flasher This is a exe file that you can download using one of the following links Win32 W...

Страница 14: ...essimmediately showingtheModuleMACaddressif successful connected After finishing this flashing process it should appear a green circle with a check icon at lower left corner Your ESP8266 module is now...

Страница 15: ...and install the latest version It requires JAVA SE version 7 and above installed In order to complete the sample project presented in this Guide you need to flash your ESP8266 with NodeMCUfirmware Ref...

Страница 16: ...lt dark Eclipse IDEA Visual Studio Undo Redo editors features Code Autocomplete Ctrl Space Smart send data to ESP8266 without dumb send with fixed line delay check correct answer from ESP8266 after ev...

Страница 17: ...s your scripts are highlighted with your code syntax Below the Code Window you have 12 buttons that offer you all the functions you could possible need to interact with your ESP8266 Here s the ones yo...

Страница 18: ...ng Your Lua Script Below is your script to blink an LED Right now you don t need to worry how this code works but how you can upload it to your ESP8266 lighton 0 pin 4 gpio mode pin gpio OUTPUT tmr al...

Страница 19: ...our ESPlorer IDE and follow these instructions 1 Press the Refreshbutton 2 Select the COM port for your FTDI programmer 3 Select yourbaudrate 4 Click Open Then in the top left corner of your ESPlorer...

Страница 20: ...The next step is to save your code to your ESP8266 At the left bottom corner click the button Save to ESP In your output window it should start showing exactly which commands are being sent to your ES...

Страница 21: ...file format to remove all the files saved in your ESP8266 You can type any commands and send them to your ESP8266 through that window After uploading your code to your ESP8266 unplug your ESP8266 from...

Страница 22: ...a interpreter which can easily program by looking the pin names associated on the Lua board If you are using generic ESP8266 device or any other vendor boards please refer to the table below to know w...

Отзывы: