Esp8266 12e With Arduino IDE With Solution+Examples

42,888

51

54

About: I am a hardcore IoT developer, i develop IoT based projects as a hobbyist as well as professionally as my source of earning. Software part such as Android Apps or Website and Hardware both are designed by me...

ABOUT- NodeMCU is an open source IoT platform. It uses the Lua scripting language, BUT this development board is now compatible to be programmed with Arduino IDE

esp8266 12e is a great way to achieve IoT with anything in a very cost effective manner,
The ESP8266 is like an Arduino with a builtin WiFI.

FEATURES ==> --10 GPIOs D0-D10 & ADC A0

--PWM functionality

--Communicaiton = I2C , SPI , 1-Wire

Note:- IT IS PREFERABLE TO USE THE LATEST VERSION OF ARDUINO IDE OR AT LEAST GREATER THAN v1.5, TO AVOID ANY POSSIBLE ERRORS THAT MIGHT COME WITH OLDER VERSIONS


NOTE :- IF YOU ARE LOOKING FOR SOLUTION ON "Board nodemcuv2 (platform esp8266, package esp8266) is unknown" PROBLEM, THEN YOU CAN DIRECTLY SKIP TO STEP 5.


Step 1: INSTALLING DRIVERS & Softwares

ARDUINO IDE -- I am assuming that you have downloaded the latest version of Arduino IDE, if hasn't yet, you can download it from HERE.

By default drivers for CP210X , which is a USB to UART converter mounted on the board is automatically installed when you plugin the board, if it doesn't,

or a YELLOW Caution sign appears with its name in DEVICE MANAGER , then you can go and check out this LINK
and download drivers, for this chip, depending on your OS.

File downloaded from this zip file will have, drivers for both 32-bit and 64-bit OS, you will find two ".exe" files in this folder, Install-
1) CP210xVCPInstaller_x64 - If you have 64-Bit OS
2) CP210xVCPInstaller_x86 - If you have 32-Bit OS

Once the drivers are properly installed the caution symbol will disappear, and you will be able to see your board at COM port greater than 2,
If it is still on COM port less than or equal to 2, then try changing the USB port you are plugging the board into.

Step 2: Adding Esp8266 12e Board Into Arduino IDE

As in most cases you won't be having, this esp866 12e development board, into your board manager of Arduino IDE, so you need to add it, manually by following these steps, as shown in the pictures

1) Open Arduino IDE (Version 1.6.5 or higher)
2) goto FILE => PREFERENCE or just press Ctrl and Comma simultaneously, and preference screen will open
3) goto Additional Board Manager's URL and add this URL http://arduino.esp8266.com/stable/package_esp8266com_index.json into the Text Box

4) Press OK
5) goto TOOLS => BOARDS => BOARDS MANAGER (as shown in the pictures above)
6) In this screen here search for "esp8266", you will find one option, Click it and download it
7) After downloading, choose the version you want to use from "SELECT VERSION" drop down (version 2.0 or above is recommended).
8) Press OK

NOW YOU HAVE ALL THE BOARDS UNDER THIS PACKAGE IN YOUR BOARD MANAGER :-)

Step 3: SELECT YOUR BOARD

step 1)Two types of board are mainly available, one with version 0.9 and other with version 1.0

But version 1.0 is recommended by me, as i had some issues with v0.9 like,

a) Automatic resetting
b) Not breadboard friendly

the only advantage, of version 0.9 is that its cheaper than the v1.0

step 2) goto to "PORT" - choose COM port, which is greater than 2, normally you will find "COM 7"

NOTE:- Keep rest of the parameters, default, as shown in the picture above


Step 4: UPLOAD THE SKETCH

step1) goto FILE => EXAMPLES => ESP8266 => BLINK

This will open Built In LED blink sketch,

step2) click on UPLOAD BUTTON as shown in the picture or just press ctrl and U, simultaneously on your keyboard

it will take some time to upload, as their are a lot of conversions, going on with the sketch

after the sketch is uploaded, you should see a little light blinking on the board.

NOTE:- IF YOU GET ANY ERROR WHILE UPLOADING THE SKETCH, THEN GOTO STEP 5, OTHERWISE SKIP STEP 5, AND ENJOY !!! :-)

SOME SAMPLES CODE ARE PROVIDED WITH IT AS WELL, YOU CAN DOWNLOAD MYSAMPLE CODES HERE

GOOD LUCK WITH YOUR DEVELOPMENT.

Step 5: Board Nodemcuv2 (platform Esp8266, Package Esp8266) Is Unknown

IF YOU ARE GETTING THIS ERROR WHICH MANY PEOPLE DOES, as i have noticed,

you need to follow the steps below, to get rid of it...

Open arduino in your PC and then

step_1) goto FILE=> PREFERENCES or press "ctrl and comma" simultaneously.

step_2) goto the PATH mentioned at the Bottom of preferences screen, as shown HIGHLIGHTED IN A RED BOX in the picture above by clicking on it
(ex-
C:\Users\"Your Username"\AppData\Local\Arduino15)

step_3) Your PC will then open a folder in the File Explorer, as shown in picture above.

step_4) Now follow this Path as => packages ==> esp8266 ==> hardware ==> esp8266
H
ERE YOU WILL FIND TWO FOLDERS, REPRESENTING TWO VERSIONS OF "esp8266"
DELETE THE OLDER VERSION, TRY UPLOADING THE SKETCH AGAIN,

AND THIS TIME THE SKETCH WILL BE UPLOADED, YOUR PROBLEM SOLVED :)
Do comment if it helped...

Good Luck, happy developing...



YOU CAN DOWNLOAD
MY SAMPLE CODES HERE

Share

    Recommendations

    • Frozen Treats Challenge

      Frozen Treats Challenge
    • Pets Challenge

      Pets Challenge
    • Fandom Contest

      Fandom Contest

    54 Discussions

    0
    None
    shreyanshkk

    21 days ago

    thanks a ton for step 5 man......

    0
    None
    Haerlanda

    4 weeks ago

    Thanks for number 5! Works great again!

    0
    None
    AgusA12

    4 weeks ago

    you save my time brother..thankyou for number 5

    0
    None
    pspranav7RenilsonL

    Reply 3 months ago

    Great....I am glad it is still helping after more then 2 years

    0
    None
    Schmidtcpt

    6 months ago

    Step 5. Thank you so much. I’ve been working on this for the entire day & no one had this idea. I owe you big time. Worked perfectly. Thanks again. Bill Schmidt

    0
    None
    wyoabe

    9 months ago

    thanks for your time to help us new guys. Is a easy fix when you know what to do.

    1
    None
    petercd

    11 months ago

    Yep, this helped me out greatly, thanks very much.

    I actually saw your comment posted on Github which led me here. :)

    Clipboard01.jpg
    0
    None
    BernhardP

    Question 1 year ago

    Hy, I think Step 5 could solve my problem, but i use a mac and there is only one Version in the Folder. In Arduino there is no Port - only Bluetooth. ???

    1
    None
    JanS222

    1 year ago

    Solved my problem, worked AAA, thanks mate.

    1
    None
    PetteriKi

    1 year ago on Step 5

    Spent many, many worhless hours for searching a solution... Step 5 helped instantly! Thanks.

    1 reply
    0
    None
    pspranav7PetteriKi

    Reply 1 year ago

    Had been through the same....
    That's why posted this instructable so others can save their time...

    And m happy that it helped you.

    0
    None
    mib75

    1 year ago

    Simples rápido e direto!! Parabéns!! Obrigadoresolveu meu problema estava quase desistindo não achava mais solução para este problema abraço!!

    0
    None
    phoenixpt

    1 year ago

    Yet another "thank you", it solved my problem.

    0
    None
    noel.kuck

    1 year ago

    THANKS!!!!!! Was pulling my hair out.

    0
    None
    jrybak

    2 years ago

    Thank you VERY MUCH for the help in Step 5.