Getting Started With the ESP8266 Chip

Getting Started With the ESP8266 Chip

The ESP866 is a tiny WiFi chip that has the huge advantage to come at a ridiculous price point: $5. And the best is that this chip also has a small processor onboard, so it can actually function in complete autonomy, without an additional Arduino board for example. Compare that to the cost of a traditional Arduino + WiFi module solution (around $40), and you will immediately see why this chip is receiving so much interest these days.

All of this makes it the perfect piece of hardware for connected home automation projects. In this article, which is the first one in a series of articles dedicated to the ESP8266, we’ll stick to the basics. We will see how to choose an ESP8266 module, what other components you need, how to configure the chip, and finally how to connect it to your WiFi network. To program the chip, we’ll simply be using the well-known Arduino IDE. Let’s start!

How to Choose Your ESP8266 Module

We are first going to see how to choose the right ESP8266 module for your project. Indeed, there are many on the market, and it’s quite easy to get lost between all the choices.

The first one that you probably heard of is the small ESP8266 Serial Wireless Transceiver module:

Getting Started With the ESP8266 Chip

This module is the most famous one, as it is really small and only costs $5. However, the number of accessible GPIO pins (outputs or inputs pins) are quite limited. It is also difficult to plug it on a breadboard.

But there are many other modules on the market, that gives you access to all the pins of the ESP8266. For example, I really like the ESP8266 Olimex module which is also cheap (around $10):

Getting Started With the ESP8266 Chip

This module can easily be mounted on a breadboard, and you can easily access all the pins of the ESP8266. This is the one I will use for the rest of this article, but you can perfectly follow along with any ESP8266 module.

Hardware Requirements

Let’s now see what we need to make the ESP8266 chip work. Indeed, it is usually wrongly assumed that you just need this little chip and nothing else to make it work, and we are going to see that it is not true.

First, you will need some way to program the ESP8266. You can use an Arduino board for that, but for me the really great thing about the ESP8266 is that it can function completely autonomously. So for to program the chip, I will use a USB FTDI programmer. Note that it has to be compatible with the logic level of the ESP8266 chip, so 3.3V. I used a module that can be switched between 3.3V and 5V:

Getting Started With the ESP8266 Chip

You will also need a dedicated power supply to power the chip. This is a point that is often forgotten and that leads to  a lot of issues. Indeed, if you are for example trying to power the ESP8266 chip from the 3.3V coming from the FTDI board or from an Arduino board, it simply won’t work correctly. Therefore, you need a dedicated power supply that can deliver at least 300 mA to be safe. I used this breadboard power supply that can deliver up to 500 mA at 3.3V:

Getting Started With the ESP8266 Chip

This is a list of all the components that will be used in this guide:

Hardware Configuration

We are now going to see how to configure the hardware for the first use of your ESP8266 board. This is how to connect the different components:

Getting Started With the ESP8266 Chip

And this is how it will look like at the end:

Getting Started With the ESP8266 Chip

Make sure that you connected everything according to the schematics, or you won’t be able to continue. Also make sure that all the switches of your components (FTDI module & power supply) are set to 3.3V, or it will damage your chip.

Also, connect one wire to the pin 0 (GPIO 0) of the ESP8266. Don’t connect it to anything else for now, but you will need it later to put the chip in programming mode.

Configuring Your ESP8266 Chip

We are now going to configure your ESP8266 chip using the Arduino IDE. This is a great way to use the chip as you will be able to program it using the well-known Arduino IDE, and also re-use several existing Arduino libraries.

If this is not done yet, install the latest version of the Arduino IDE. You can get it from:

http://www.arduino.cc/en/main/software

Then, you need to take a few steps to be able to configure the ESP8266 with the Arduino IDE:

  • Start the Arduino IDE and open the Preferences window.
  • Enter the following URL: http://arduino.esp8266.com/package_esp8266com_index.json into Additional Board Manager URLs field.
  • Open Boards Manager from Tools > Board menu and install the esp8266 platform.

Now, we are going to check that the Arduino IDE is correctly working, and connect your chip to your local WiFi network.

To do so, we need to write the code first, and then upload it to the board. The code is will be quite simple: we just want to connect to the local WiFi network, and print the IP address of the board. This is the code to connect to the network:

// Import required libraries
#include "ESP8266WiFi.h"

// WiFi parameters
const char* ssid = "your_wifi_name";
const char* password = "your_wifi_password";

void setup(void)
{ 
// Start Serial
Serial.begin(115200);

// Connect to WiFi
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");

// Print the IP address
Serial.println(WiFi.localIP());

}

void loop() {

}

You can simply copy the lines of code above, and copy them into the ESP8266 Arduino IDE that you downloaded before. Of course, put your own WiFi name & password in the code. Save this file with a name of your choice.

Now, also go in Tools>Boards, and select the board you are using. If you are not sure about which board to choose, simply choose “Generic ESP8266 Module”. Also select the correct Serial port that corresponds to the FTDI converter your are using.

After that, we need to put the board in bootloader mode, so we can program it. To do so, connect the pin GPIO 0 to the ground, via the cable we plugged into GPIO 0 before. Then, power cycle the board but switching the power supply off & then on again.

Now, upload the code to the board, and open the Serial monitor when this is done. Also set the Serial monitor speed to 115200. Now, disconnect the cable between GPIO 0 and GND, and power cycle the board again. You should see the following message:

WiFi connected
192.168.1.103

If you can see this message and an IP, congratulations, your board is now connected to your WiFi network! You are now ready to build your first projects using the ESP8266 chip & this modified Arduino IDE.

How to Go Further

You now have a completely usable ESP8266 module, so basically what you can do next only depends on your imagination! You can for example use this chip to build a WiFi motion sensor, to control a relay remotely, and also to send data to a remote cloud platform.

I will post articles about applications of this board in the coming weeks, but in the meantime don’t hesitate to experiment with this amazing little WiFi board and share your projects in the comments!

Want to learn more? Get my free eBook about the ESP8266!
The ESP8266 is an amazing WiFi chip that you can use to build all sorts of projects. Download today my free eBook "Build a WiFi Weather Station with the ESP8266". Simply click on the button below!

Leave a Comment

Please enter your name.
Please enter your email.
Please enter your comment.
Brian in a few seconds
Hi...thanks for the great tutorial! I'm curious on the requirement of the additional power supply as so many other tutorials don't mention that. I'm a noob with this, so I'm not questioning the reasoning...just trying to learn what is needed and why. Thanks!
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Nobod 2 months ago
What programer do I select
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Marco Schwartz Nobod 5 days ago

You need to select the one that corresponds to the chip you are using :)

Zizixa 2 months ago
Thanks great tut
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
William 5 months ago
Thank you for this tutorial. Very simple introduction for using ESP8266 with Arduino IDE. Recommend this to anyone starting out with this chip. Thanks again.
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Marco Schwartz William 5 months ago
Thank you !
Les Saunders 9 months ago
Is anyone using ESP-now protocol for wireless networking?
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Chris Newman Les Saunders 6 months ago
Using ESP-now for sensor communication what are you trying to do?
Billd39ET 9 months ago
Great, simple tutorial! Thnx! I've been looking for something like this for a long time, basic and easy to understand. I confirmed the setup with a number f different ESP8266 breakout boards and a number of sketches. all worked as you describe, thnx!
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Marco Schwartz Billd39ET 7 months ago
You're welcome, happy you like it!
Gaetano 10 months ago
Looking forward to learning how to build an IoT project using the amazing ESP8266 chip. PS I tried clicking the Complete Order button at the bottom of this screen and nothing happens...
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
pewpewpew97 a year ago
Hi, I am trying to program ESP6288 to send sms to my phone. As I am still a student and new to this, do you mind helping to provide some tutorials?Thanks.
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Erik Daudey a year ago
Correct boardmanager URL is now: http://arduino.esp8266.com/...
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Staffan Simmons Erik Daudey 10 months ago
May I suggest: http://arduino.esp8266.com/stable/package_esp8266com_index.json This would be a link to the latest stable version.
dipesh patidar a year ago
and one more thing......it is too much costly on amazon is there any alternate option to purchase it so please provide a link
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
dipesh patidar a year ago
hello Macro,how can i program it using arduino uno??
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
MrTheKod a year ago
Lovely Tutorial. I could probably have spent all afternoon working this out. Done in one hit. Brace yourself internets.. I am on you now.
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Fasih Uz Zafar 2 years ago
Kindly Guide me how to operate a relay using nodemcu.relay needs 5volt to operate and nodemcu gpio output is 3.3volt.which one better for me.Logic level converter or npn transistor (if this,kindly share the ckt diagram.)
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Umar M 2 years ago
Thank you very much for posting this, I was quite confused with all the other tutorials around how to program the 8266 but this one was the most clear and concise.
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
HowTo ESP8266 2 years ago
Hi there, I find this article very helpful and would like to let you know that I am running a website with additional information about ESP8266 modules and Arduino boards. I will share it here, because many of your visitors may find it interesting and helpful as well - https://howtoesp8266.com If you think that I am trying to promote myself, delete my comment, but I suggest you to take a look before doing it, because I am pretty sure it will be very interesting to you. Best regards!
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Priyanka Dookie 2 years ago
Hello,How do I switch to the 3.3V level? Thanks
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
stockdam 2 years ago
Hi, I've just started with the ESP8266 and your simple program above is one of the first that I used. It worked perfectly, thanks.
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Ashley Hathaway 2 years ago
Hi Marco,Excited to get started but I'm having trouble finding the http://arduino.esp8266.com/.... I go to my board manager but unfortunately don't see anything there. I'm also getting a "error downloading http://downloads.arduino.cc..." in the board manager window. Am I missing a step?Thanks,Ashley
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Marco Schwartz Ashley Hathaway 2 years ago
Hi Ashley, the best for this step is to follow the instructions from this page: https://github.com/esp8266/.... Hope that helps! :)
Simon 2 years ago
Hi, Thanks for sharing your knowledge you make the clearest tutorial/articles I could find.I have a problem whith the esp communication and connection. I upload the base test code then it keep writting dots on the monitor. Also the text is random and unreadable.I can read some information when I lower the baud rate to 74880 but instead of dots its a random weird character.I have verified my SSID and password they are correct. Tried different baud rate for the monitor. Still not able to get pass the ''trying to connect'' phase.
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Maurice Sallave 2 years ago
Hi Marco!First off I would like to thank you for doing this tutorial, it's one of the best I've seen. Very clear and easy to follow. I'm new to the IOT world and just wrapping my head around the esp8266. I was able to the WIFI connection to give me back my ip address, but could not run any at commands. Do I need to enable something or is that something that should happen right away? I also tried viewing my IP address via the browser and get "This site can’t be reached 10.20.21.160 refused to connect.", assuming 10.20.21.160 is my internal ip in the office. Thanks for any help as I'm on a quest to learn this...Thanks for your time!
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Marco Schwartz Maurice Sallave 2 years ago
Thanks! Not sure this is your problem, but you really need to enter the IP address of your ESP8266 board and not of your computer.
mythili kumaresan 2 years ago
"Is the ESP8266 Uart Serial to Wi-Fi Wireless Module reliable with Arduino for long term projects?
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Marco Schwartz mythili kumaresan 2 years ago
Sure!
Zing Zang 2 years ago
Hello Marco,I can't thank you enough for writing this tutorial.I was very confused with all kinds of boards available these days and didn't know if it was possible to make a standalone module. Your detailed yet simple to follow write-up on this 'autonomous' concept was a great relief.People like you make internet a great learning platform!
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Marco Schwartz Zing Zang 2 years ago
You're welcome!
AHMAD BIN Khalid 2 years ago
Hi MarcoI have just recently started working with the Olimex MOD-WIFI ESPE8266-DEV chip. I am using the Arduino IDE to program it as you did. I am trying to use the hardware SPI on this chip to connect a RFID Reader and I am using this library: https://github.com/miguelba... . Thus library is compatible with ESP8266.I have tested my code with an Arduino UNO and it works but when i used the same code on the ESP8266, the reader doesnt pick up the card. I suspect the problem is in my pin connections I have made the following connections:Reader (MFRC522) --> ESP8266SCK --> SD_CLK (pin 5)MOSI --> SD_D1 (pin 7)MISO --> SD_D0 (pin 9)SDA --> GPIO15 (Slave Select)RST --> GPIO13The last two pins can be connected to any GPIO pins. They are selected in software. I am using the following code:#include "ESP8266WiFi.h"#include <spi.h> //include the SPI bus library#include <mfrc522.h> //include the RFID reader library#define SS_PIN 15 //slave select pin#define RST_PIN 13 //reset pinMFRC522 mfrc522(SS_PIN, RST_PIN); // instatiate a MFRC522 reader object.MFRC522::MIFARE_Key key;//create a MIFARE_Key struct named 'key', which will hold the card information#define BAUD 115200//Setup Loopvoid setup(){ Serial.begin(BAUD); SPI.begin(); mfrc522.PCD_Init(); for (byte i = 0; i < 6; i++) { key.keyByte[i] = 0xFF; }}//Main Loopvoid loop(){ // Look for new cards, and select one if present if (!mfrc522.PICC_IsNewCardPresent() || !mfrc522.PICC_ReadCardSerial()) { delay(50); return; } Serial.print(F("Card UID:")); dump_byte_array(mfrc522.uid.uidByte, mfrc522.uid.size); Serial.println();}Can you please help me identify what the problem might be.Thank You
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Marco Schwartz AHMAD BIN Khalid 2 years ago
Hello, for this kind of request make sure to plan a consulting call with me: https://www.openhomeautomat...
Milap Jhumkhawala 2 years ago
Hey Marco, I am using ESP12E and is there a way that it can listen to wifi networks, make a list of wifi networks in the vicinity.
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Marco Schwartz Milap Jhumkhawala 2 years ago
Hey, that's definitely possible, check the examples coming with the ESP2866 Arduino library :)
Comi 2 years ago
Hi Marco,i have this error:test_WiFi.ino: In function 'void setup()':test_WiFi.ino:12:1: error: 'WiFi' was not declared in this scopetest_WiFi.ino:13:25: error: 'WL_CONNECTED' was not declared in this scope
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Marco Schwartz Comi 2 years ago
Hi, make sure you have select one ESP8266 board before compiling or the library won't be available.
artpi 2 years ago
ESP8266 is amazing! Especially the new ESP8266-12e, which packs I/O thus rendering arduino not necessary.I made a Smarthome setup from these chips: http://firenet.artpi.net/ - see demo video here. It packs IFTTT , Siri integration, lights control, power switches and much more. Everything open source
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Dave 2 years ago
Hi MarcoNice article, looks good but can I ask which version of arduino ide you use, I am using 1.67 and its coming back with errors I.e, In file included from D:\Arduino\libraries\ESP8266WiFi\src/ESP8266WiFiSTA.h:28:0, from D:\Arduino\libraries\ESP8266WiFi\src/ESP8266WiFi.h:34, from D:\Arduino\libraries\ESP8266WiFi\examples\WiFiClient\WiFiClient.ino:9:D:\Arduino\libraries\ESP8266WiFi\src/ESP8266WiFiGeneric.h:27:22: fatal error: functional: No such file or directory#include <functional>has anyone else had this problem ??cheers Dave
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Lennyz 2 years ago
Hi Marco! Great article you wrote!I was looking at the Olimex website and I came across this:https://www.olimex.com/Prod...Isn't that exactly the same as you have build? The only difference is that everything is already integrated in the package?I am new to the kind of things some I am still learning.
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Marco Schwartz Lennyz 2 years ago
Thanks! Yes, that's the same module but used on top of another board that can be used to control a relay.
syed niamath 3 years ago
Hi Macro, when I run the code, I get the following response"wdt resetload 0x4010f000, len 1264, room 16tail 0chksum 0x42csum 0x42~ld"I tried using ssid & password and also tried skipping it. I am using my home wifi.
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Marco Schwartz syed niamath 3 years ago
Hi, strange! Do any other sketches work on your ESP8266 ?
karzan raza syed niamath 2 years ago
Hi im working on my final project , i want to send data to a web server which i got it from ultrasonic sensors through esp68266 , can you help me please , tour help is highly appreciated.
Nick 3 years ago
Hi Marco , is it possible to control multiple esp8266 modules from app at the same time, without the need of internet/wifi/cell signal (in AP mode)
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Marco Schwartz Nick 3 years ago
Sure, you can check my aREST libraries for the ESP8266: https://github.com/marcosch...
Joe Dassin 3 years ago
Hi Marco,Thanks for the great project you do...I have a nodeMCU ESP12E which works great at home with the code above. Now I need to run the same code but on my corporate Wi-Fi. The problem is there is only SSID (guest) that i can connect to and that does not require password.How can I modify the code above to eliminate the need of a password?Thanks,
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Marco Schwartz Joe Dassin 3 years ago
Hello Joe, thanks for your comment! I think you can just omit the password in the connection, like: WiFi.begin(ssid);
blacai 3 years ago
Hi, I bought the book last year and I had some issues. Now the version on the website is slightly different, but it works.Are there any more changes regarding to the wiring/code?Do we get an updated/corrected version on pdf?Thanks
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Marco Schwartz blacai 3 years ago
Hello! Please contact me at [email protected] for all enquiries about the book(s). Thanks!
Bhargav 3 years ago
Hi Marco,I simply love your projects based on home automation and all your cool ideas ^_^Based on your tutorials I am thinking of a project,so could you please help me out😁Primarily,I want to use esp8266 to trigger a relay when command is sent through Raspberry Pi by a smartphone (like pairing it with ifttt app or OpenHAB app or blynk app or any other similar one)Basically, Raspberry Pi is used as a hub to control several esp8266 based IoT devicesSecondarily,For the more advanced part like adding touch screen display to Raspberry Pi hub and having universal remote like home automation interface and with smartphone apps as a secondary control and all that cool stuff :)Hoping that you will help me out to get this project to life-Thank You :)
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Marco Schwartz Bhargav 3 years ago
Hi Bhargav, thanks for your kind message! For your first project I recommend my book that I wrote about the ESP8266 & the Raspberry Pi: http://www.amazon.com/Home-...For your second project, that's nothing I've done yet but love the idea! You can get in touch me via email if you need additional assistance.
Marty 3 years ago
This is the most informative article about this subject I've seen so far! I am going to ty this, but I dont have USB module. I've read online that I can use Arduino Leonardo for this. Any suggestions about that? Is the code going to be the same? Thanks ;)
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Marco Schwartz Marty 3 years ago
Thanks! Yes indeed, you could do that with an Arduino board acting as a USB - Serial converter. I suggest to check out tutorials online, as it's not something I did myself so far.
Andy Darwin 3 years ago
Hi Marco, merry Christmas to everyone..I try to do more than 5 button for the Relay Control example.Instead of 1.So i call the button function 5 times with pin no 2,4,12,13,14 ( i am using esp8266 -201)It works perfectly fine for like first minute then the whole things just freeze out.It happened always when i turn few LED on..the esp8266 freeze.I aslo try to add serial.print (millis()) to the end of the loop, let it print to com monitor ..and i can see the esp8266 frozen when it stop sending msg to my monitor ( Tx light off ).Anybody face same problem here ? Do esp8266 is so Unreliable ???
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Marco Schwartz Andy Darwin 3 years ago
Merry christmas to you! Usually I don't have issues with the ESP boards I used, but might be an issue related to the -201 variant.
Andy Darwin 3 years ago
my next Question will be can I control my home when i far away from home ? IE : Not Local Connection.example i am in overseas.. i want to turn my home light on.
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Marco Schwartz Andy Darwin 3 years ago
Hi Andy, I developed software that does exactly that :) Have a look at http://arest.io/esp8266-cloud/
eyra 3 years ago
hye, i want to make home automation project,(controlling light) for energy saving. and use ESP8266, thus did i really need arduino too? please help
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Marco Schwartz eyra 3 years ago
No, you can just use the ESP8266 on its own :)
Wibbly Wobbly 3 years ago
This would seem to integrate much of what's required into a compact and low cost solution, right?https://www.olimex.com/Prod...
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Marco Schwartz Wibbly Wobbly 3 years ago
Indeed! Never used it but it looks like a great product.
Sanjeev Sharma 3 years ago
Hello Marco,Using ESP8266 How many appliances can be controlled ?
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Marco Schwartz Sanjeev Sharma 3 years ago
Hello! From one ESP8266 it depends on the pins available, with many boards there is nearly no limit :)
DrSurfer 3 years ago
Hi Marco. I'm trying to follow the "breadboard schematic", but I found somewhat confusing the pin numbers. My guess they are related to the 8 pin modules and not to the Olimex PCB. I hate to see smoke, so could you please post the right schematic? Thanks in advance.
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Marco Schwartz DrSurfer 3 years ago
Hello, indeed it's hard to make a schematic for each board :) If you don't like to see smoke the best is to check the pins directly on the ESP8266 board itself. If you get the power supply right then you can experiment with other pins :)
Nandan Sarma 3 years ago
hi..Can I get a complete Home Automation with ESP 8266? Node MCU board has only 10 GPI/O port.
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Marco Schwartz Nandan Sarma 3 years ago
That'd be hard. I recommend having several ESP8266 projects interacting with a hub, for example a Raspberry Pi
Sanjeev Sharma 3 years ago
Hello Marco,I have been already in discussion with you on my project but here it would be good if we can discuss on an open forum..Here is my end goal.I want to build a full home automation system with many modules communicating together and with a central node.For example a Board switch which connect to the electric board and perform on/off of load like A.C,bulb,geyser,fan etc.This could be more than 1 in an house which will interact with Main Board which is connected to wifi router.Everything should be control from an remote application and instruction should go to Board switch from Main Board(controller). For example if I want to ON Fan from an remote application then this should go to Main Board and then from main Board it should reach to Board switch on which Fan is being controlled.For this I should have 2 device 1)Main Board 2) Board switch which will communicate over some wireless technology. Please suggest which platform can be used to suit this requirement and also platform should be flexible enough to controlled more use cases in future.You suggested to go ahead with Raspberry Pi as the central platform because of various advantage of Raspberry Pi over Ardunio-> http://readwrite.com/2014/0....On other hand you suggested Arduino boards with WiFi (for example with the CC3000 chip) for controlling switch,which is too costly and my use case is pretty simple like receive the signal from main controller and then take appropriate action like on/off relay. I am thinking to use ZigBee/Zwave mesh network to talk to intended device in network or master Controller and I think your earlier suggestion to use ESP8266 for the board switch can make sense which is not too costly as compared to CC3000 chip.To achieve it I think that I should have ZigBee/XBee modules with the ESP8266 so that signal sent from Main controller can be received from intended board switch and take action accordingly.I am stuck here and your pointer and help would be really appreciated.
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Marco Schwartz Sanjeev Sharma 3 years ago
That's a lot for those comments, please send me an email :)
Avande Atena 3 years ago
Hi, SirNow I'm working with ESP8266 ESP-12, but I don't have FTDI then I using Arduino Uno board instead.When I uploading, there is some errors:warning: espcomm_sync failederror: espcomm_open failedPlease help me
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Marco Schwartz Avande Atena 3 years ago
Hello, having never tried this I can't really help with the issue, I really recommend getting an FTDI board :)
Matteo Zandi Avande Atena 3 years ago
maybe you forgot to connect GPIO0 to GND in order to put the board in bootloader mode
Saul 3 years ago
Congratulations on your project!!I have an error when compiling the line "Wif.begin (ssid, password); can you help?
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Marco Schwartz Saul 3 years ago
Thank you!! Seems like you are missing an 'i' here :)
Keche Oche 3 years ago
Hi there.i'm new at this stuff but i tried the sketch above to see if i can obtain the IP address of my devkit but the serial monitor display strange writeups. please what am i not doing right? PS. i'm using the Nodemcu 1.0 ESP-12E devkit. thank you
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Marco Schwartz Keche Oche 3 years ago
I think now there is an option for the NodeMCU devkit inside the Arduino ESP8266 library, check this out :)
Glenn Healy 3 years ago
I'm a big believer in giving credit where credit is due and I want to thank you for the accuracy and simplicity of this article. I have over 30 years experience in the IT field and was just about to give up on the WSP8266 for the lack of a reliable "getting starting" guide, when I came across your article. 15 minutes later I had a couple of ESP-12's logging into my WIFI network. I'm looking forward to reading more articles on this site. Thank you and cheers.
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Marco Schwartz Glenn Healy 3 years ago
Thanks for your kind comment Glenn!
Mathieu T 3 years ago
Tanks for your tutorial.. just one quick question. The pin number you are mentionning are refering to the olimex board or to the ESP chip?? It seems to have same board as you, but I can't find the PINOUT specification and ccording to you picture, you have something connected around the pin 13... and I cannot get what it is. Thnaks for your help.
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
MOREAU 4 years ago
Hi ,After many fruitless researchs, do you know where i can found the really good website to obtain FT232R USB UART driver Windows 811 ?Thanks for your response
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Aakanksha 4 years ago
Hi,I have been trying to upload program to esp8266 type01 using ftdi following instruction from your book on Open home automation with esp8266. But, there is error in uploading:warning: espcomm_sync failederror: espcomm_open failedKindly help out.
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Marco Schwartz Aakanksha 4 years ago
That seems like a problem with the FTDI converter connections. Please get in touch with me by email directly to solve the problem.
jihad 4 years ago
Hi, I'm really interested with Esp8266. since 2 weeks I can't get started with it because when I open terminal and write:MacBook-Pro-alkhas-b-jihad:~ inventor$ ./esptool.py –port /dev/tty.SLAB_USBtoUART-A9014TM4 write_flash 0x00000 nodemcu_latest.bialways I found:-bash: ./esptool.py: No such file or directorywhat do you think about this problem and how can I solved it ?thank you
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
David Perlman 4 years ago
Hey I think there is an error here. CTS is an input, not an output, so connecting it to GPIO_0 won't work at all, it won't be able to control that pin and pull it low for programming mode. To use the current (as of this writing, 2015-04-14) version of esptool.py you need to have access to both DTR and RTS, although I imagine you could work around that by manually driving GPIO_0 low, or something like that.
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Marco Schwartz David Perlman 4 years ago
Hi David, good point, all I can say is that it is working fine with these connections. But I'll double check that to be sure :)
Inginiero 4 years ago
Hi, I'm really inspired by your projects, and follow your tutorials with interest. This chip is called to be the Arduino killer in IoT projects, don't you think? I've found this Github project https://github.com/esp8266/... so maybe we won't need to learn Lua? I haven't tried, waiting some modules I bought to arrive. Regards
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Marco Schwartz Inginiero 4 years ago
I totally agree with you! Well actually I already updated this tutorial so you can configure the board with either NodeMCU or the modified Arduino IDE.
adam storm 4 years ago
Your project is interesting. I would like to use the technology for personal medical devices that would be compatible with US FCC personal network guidelines. Do you know if anyone else is working on a similar project? http://www.agescota.com/aeg... - one of projects. I'm not familiar with FTDI USB module, where can I find more info? If I purchase 5 ESP8266 Olimex modules should I get through amazon where the link took me or from Olimex?
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Marco Schwartz adam storm 4 years ago
I don't know of a similar project, but it seems like a very good idea! I would better buy the modules directly from Olimex if you are in Europe, the Amazon link is better if you are living in the US or Canada.
Starwolf73 4 years ago
Thanks Marco for saving me time on research and simplify it. It give me more time to work on real projects. Continue your great work! Can't wait to try it this week-end.
Reply
Please enter your name.
Please enter your email.
Please enter your comment.
Marco Schwartz Starwolf73 4 years ago
You're welcome! It is well known that the NodeMCU firmware still has some bugs, that's why I will only post a new article when I am sure that the project is working reliably. But for sure everything that is in this article is working 100% :) Don't hesitate to share your projects here!
Shares
Getting Started With the ESP8266 Chip Getting Started With the ESP8266 Chip Getting Started With the ESP8266 Chip Getting Started With the ESP8266 Chip Getting Started With the ESP8266 Chip Getting Started With the ESP8266 Chip
Someone from the United States
Recently signed up
10 hours ago
Someone from Netherlands
Recently signed up
2 days ago
Someone from Brazil
Recently signed up
3 days ago
Someone from Belgium
Recently signed up
4 days ago
Someone from Australia
Recently signed up
4 days ago
Someone from the United States
Recently signed up
5 days ago
Someone from Italy
Recently signed up
5 days ago
Someone from Greece
Recently signed up
7 days ago
Someone from Germany
Recently signed up
7 days ago
Someone from Slovenia
Recently signed up
8 days ago
40 people recently viewed this page