Wemos ESP8266 Getting Started Guide With Arduino IDE

125,028

83

14

Introduction: Wemos ESP8266 Getting Started Guide With Arduino IDE

About: As a young lad Tom spent most of his days at the heels of his father, working in their shop, also known as the basement. His dad was an extraordinary cabinet maker and while working on their 1850’s home,…

This instructable will take you through the basic set up of the WEMOS ESP8266 Board and the Arduino IDE.

Step 1: About the Wemos & What You Need

About:
  1. Wemos D1 Mini:
    • Microcontroller: ESP-8266EX
      • Operating Voltage: 3.3V (chip) 5v (board)
      • Digital I/O Pins: 11
      • Analog Input Pins: 1(Max input: 3.2V)
  2. Mirco USB for power and programming
  3. CH340G Serial to USB chip
  4. The Wemos is better than a normal esp board because you can directly program it.
  5. It can be programmed using little effort, and the Arduino IDE.
  6. There is lots of support for the ESP and the Arduino.
  7. The ESP8266 low-cost Wi-Fi chip with full TCP/IP stack

Links:

  • https://www.wemos.cc/product/d1-mini.html
  • https://www.arduino.cc/
  • https://github.com/esp8266/Arduino.git

What you need:

Step 2: Soldering the Headers

  • The WEMOS board comes with 3 different types of headers.
    1. Female
    2. Male
    3. Female/Male (long female)
  • I use a breadboard to solder these on. It helps keep everything aligned. I find it better that using the helping hands. You do want to be careful because you may melt the plastic of the breadboard if you heat up the pins to much.
  • For the purpose of my project and future projects I am going to use the Female headers. These will allow me to install shields. The WEMOS board has a number of shields and I will be using the Temp and Relay shield in a future build.
  • When Soldering you want to make sure you don't use too much solder, it will result in a ball of solder on your pin. If you use to little solder or not enough heat you can risk no connecting them fully. Take a look at my last picture to see what good solder joint looks like.

Step 3: Download the Arduino IDE

This part is pretty self explanatory and I wont go into how to install a program.

Navigate to the https://www.arduino.cc/ and download the correct IDE for your operating system.

Step 4: Download and Installing the CH340G Drivers (Windows)

The CH340G is a cheap serial to USB programming chip and does not come with native windows or mac drivers. However it has been made very easy to install.

Download and install the drivers through the wemos website: https://www.wemos.cc/product/d1-mini.html

Step 5: Installing the Board on Arduino 1.6X

Version 1.6.4 of the Arduino IDE introduced official support for adding third party boards to the new Board Manager. This addition is great news, because it allows users to quickly add new boards with the click of a button. Previously the addition of new boards required a cumbersome manual installation process, or in certain cases, the download of a completely separate version of the IDE with the new boards added.

  1. Go to the wemos website: https://www.wemos.cc/product/d1-mini.html
  2. OR go direct to github: https://github.com/esp8266/Arduino.git
  3. There you will find these instructions:
    1. Enter http://arduino.esp8266.com/stable/package_esp8266... into Additional Board Manager URLs field. You can add multiple URLs, separating them with commas.
    2. Open Boards Manager from Tools > Board menu and install esp8266 platform (and don't forget to select your ESP8266 board from Tools > Board menu after installation).
  4. Profit.

Step 6: Installing the Libraries

  1. Go to Sketch
  2. Then Included Libraries
  3. Then Library Manager
  4. Search: ESP8266 Microgear
  5. Install the top one (see image)

Step 7: Getting Ready to Upload

  1. To to Tools
  2. Board >
  3. Select Wemos D1...
  4. Make sure you have the correct COM port selected.

Step 8: Uploading the Sketch

To get us started I just uploaded the Blink Sketch.

This sketch is designed to blink the LED onboard the ESP8266. It is the prefect sketch to figure out if you have installed and configured everything properly.

The Sketch will open the new window, click the compile button and watch in the debug windows at the bottom.

Once the compile is down you will see that progress bar of the upload, this will be orange. "loading.......50%" something like that. During this you will also notice that the LED on the WEMOS board will start to blink rapidly, almost to fast to even notice.

Once done the loader will show 100%. The board will restart and start blink once every 2 seconds.

Your Done, Subscribe to my Youtube and Instructables Accounts for part 2,3 and 4

https://www.youtube.com/channel/UC5-KZ_TpZ8_0Ko0xcepuskQ

Microcontroller Contest 2017

Participated in the
Microcontroller Contest 2017

Be the First to Share

    Recommendations

    • Make it Glow Contest

      Make it Glow Contest
    • First Time Author Contest

      First Time Author Contest
    • PCB Challenge

      PCB Challenge

    14 Discussions

    0
    dimgod59
    dimgod59

    8 months ago

    thanks ! :)
    just a little question : can the wemos sensor be powered by cr2032 type batteries or something similar? and autonomy?

    0
    SquerllB
    SquerllB

    Question 11 months ago

    D1 wemos when plugged in shows error: Unknown usb device(device descriptor request failed) i have been looking at comments and videos on it for hours and would very much appreciate help. I have the CH34x driver and am using windows 10. The device shows under universal serial bus controllers

    0
    bence.zahalka
    bence.zahalka

    1 year ago

    This instructable made the setup easy. I did not had to think at all, just follow the steps - thank you!

    0
    matelot2
    matelot2

    Question 1 year ago

    will this work with the wemos D1 R1?
    thanks

    0
    ShashiK3
    ShashiK3

    Answer 1 year ago

    Not sure, I just bought the Wemos D1 Mini and tried to get to the Wemos page and it says Page not found !

    0
    mukeshgupta12
    mukeshgupta12

    Question 2 years ago on Step 8

    hello sir
    i have one question in my mind
    i have a code for temperature sensor with esp 8266 12 e. i set this code to take reading every 30 min
    but when i insert this code to esp it take reading every 27-28 min. i cannot understand that where is the error in code or hardware plz tell me. i can share my code also ...thanks
    please reply me

    0
    gctseng
    gctseng

    2 years ago

    Just found this and it worked great. I had spent many hours trying to get a basic grasp of what I could do to even set it up, and I'm so happy to have found this. Hope you use the Wemos on more projects soon.

    0
    mbedgeek
    mbedgeek

    2 years ago

    Really helpful. Thank you.

    0
    gluckc
    gluckc

    2 years ago

    Looked forward to trying this... went through all the steps. Then realized that I accidentally bought a WEMO D1 mini LITE. I'll go ahead and get the D1 mini, but do you know if the LITE version can be used in the same way? I'm guessing it uses different drivers at least, since it wasn't recognized by the arduino IDE. I'm bummed. Now I have to wait to try again.

    0
    StanislavP9
    StanislavP9

    2 years ago

    Hello! :) Could you help me with my issue? I've followed your tutorial and encountered this issue:

    In file included from c:\programdata\matlab\supportpackages\r2017b\3p.instrset\arduinoide.instrset\idepkgs\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\algorithm:60:0,

    from C:\ProgramData\MATLAB\SupportPackages\R2017b\3P.instrset\arduinoide.instrset\idepkgs\packages\esp8266\hardware\esp8266\2.4.1\cores\esp8266/Arduino.h:254,

    from sketch\sketch_mar25a.ino.cpp:1:

    c:\programdata\matlab\supportpackages\r2017b\3p.instrset\arduinoide.instrset\idepkgs\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\utility:68:28: fatal error: bits/c++config.h: No such file or directory

    #include <bits/c++config.h>

    ^

    compilation terminated.

    Thanks in advance for your reply!

    0
    RaviM72
    RaviM72

    3 years ago

    Got me started with Wemos. Thanks :-)

    0
    Lacybad
    Lacybad

    3 years ago

    It was a really good help for me :)

    0
    jasonangel29
    jasonangel29

    3 years ago

    lots of great help for beginners

    0
    innovativetom
    innovativetom

    Reply 3 years ago

    Thanks! Parts 2,3 and 4 should be a little better.