ESP8266 Support WIKI

User Tools

Site Tools


start-with-esp-12-arduino

Table of Contents


Start with the ESP-12 and the Arduino tools

Hardware

* usb-to-esp8266-serial-wireless-wifi-module-developent-board-8266-wifi-module.jpg_640x640.jpg

  • ESP-12E module depending on module type additional wiring with resistors may vary. A few resistors have to be added to module 12E. On modules on next generation 12S or newer resistors may be on board or if the withe breakout board (http://thethingofinternets.com/?p=4) is used two resistors are on the board.
  • 12E needs:
  • one 10k resistor from GPIO to GND,
  • one 10k from EN (or labeled CH_PD) to VCC,
  • one 10k from GPIO0 to VCC,
  • one 10k from GPIO2 to VCC.
  • 3.3V power supply or supply from adapter
  • USB-serial adapter (CH340G USB to ESP8266 Serial Wifi Module Development Board Adapter) this one has no switch for programming on board. USB zu (ESP8266 seriell Adapter ESP01 Programmierer ESP UART Arduino) also can be used is nearly the same sure others also will work, just make sure the have a lever changer on board.
  • If programming swish is missing one has to add the two jumpers or the switch.
  • Wire up Reset and Programming switch
  • RXD from adapter to TX on ESP12E and
  • TXD from adapter to RX on ESP12E,
  • GND to GND and
  • VCC 3.3V to VCC 3.3V of ESP12E if supply from the adapter is in use or an external 3.3V supply.
  • Additional Capacitors should also be added for more stability. 1nF plus 1000uF aluminium electrolytic capacitor proved to be best.
  • To use programming switch and reset switch from the adapter one also has to connect this two wires from adapter to the ESP12E.


Software

  • Connect Hardware as shown in description Hardware on top here.
    • Plugin Adapter (without ESP connected) to USB and check in Windows with Hardware manager that the added COM port ist working. And verify the COM“XX” in use. You may use Putty to test the COM port with RXD and TXD connected toggelter. This will give you an echo on the Terminal all you type comes back to the display.
    • Install Arduino form “https://www.arduino.cc/en/Main/Donate
    • Open in Arduino “File” → “Preferences” window and add in an additional Board Manager URL:http://arduino.esp8266.com/versions/2.4.1/package_esp8266com_index.json
    • Type in “esp8266” and select the correct chip in the popup window. And select the latest version 2.4.1 and push putten for install.
      * Open in Arduino “Tools” → Board:“xxxxxxx” Board manager window and find Board name: “NodeMCU 1.0 (ESP-12E Module)“(Alternativ one can install the latest Master version from Git as explained here: https://github.com/esp8266/Arduino)
    • Open in Arduino “Tools” → PORT:“xxx” the port your Adapter is on.
    • Open in Arduino “File” → “Examples” and find → “Examples for NodeMCU 1.0 (ESP-12E Module)” → and then “ESP8266” → then”BlinkWithoutDelay” Example.
    • Add the following Line on top of the Example: #define LED_BUILTIN 2 (This is needed because the Example is written for a ESP-01 module and not for ESP-12. The blue LED is on internal PIN 2 not on PIN 1. There seams to be some confusion on Port numbering. On the board is written TXD0 for this pin.)
    • Turn on the program swish on the board or on the adapter. → Push reset.
    • In Arduino push the upload (Blue error →) and wait until 100% is reached. While uploading the blue LED on the board is flashing.
    • Turn the program swish off on the board or on the adapter.
    • Push reset on the Board or on the Adapter. Maybe a additional power of and on is also needed.
    • Now the on board Led should be flashing fast. Unfortunately the blue Led is also flashing slower if something did go wrong.
    • You also can watsch the output on the Terminal within Arduino got to Tools - serial Monitor change to 74880 Baud do a reset again.
    • Output should be just one time and not repeated like this:

    If repeated output happens the board is rebooting, something wrong with the program or wiering.

  • Adapter can be removed now and programmed module can be used with external 3.3V supply.
start-with-esp-12-arduino.txt · Last modified: 2018/04/01 11:12 by jpascher