Introduction: Esp8266 12e With Arduino IDE With Solution+Examples
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
--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
HERE 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
We have a be nice policy.
Please be positive and constructive.
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. ???