I am interested in making a home automation system using Arduino Nano + ESP8266 ES-01 + 12V Relay.
Can anyone anyone tell me how can I connect my Arduino Nano to wifi by using ESP8266 ES-01.I just want to connect my Nano to WiFi and control Relay using Nano.
TechDroidROOT:
Can't I use it as a shield for arduino Nano?
Yes, you could, but it's just much more cumbersome, and there's no reason whatsoever to do so.
Imagine an Arduino connected via USB to your computer. Let's say you want to receive messages over USB, and turn on/off relays.
You could connect a second Arduino to that first Arduino, and have the first Arduino receive messages, and the second turn on or off the relays. It would work of course, but it doesn't make any sense. The first Arduino can handle the relays perfectly fine, so adding the second Arduino is just a waste of hardware and (more importantly) time.
An ESP8266 is a microcontroller with WiFi built-in. As a microcontroller, it is many times more powerful than your standard Arduino, so it can perfectly turn on/off some relays while doing WiFi stuff at the same time.
Adding a second microcontroller is not a great solution.
If you find yourself needing more pins than the ESP-01 has available, get a board that breaks out all of the ESP8266's pins, like the WeMos D1 mini. Additional advantage: it has a USB interface to program it directly. It costs around €3, so that's really not the issue.
Alternatively, get a 74HC595 shift register to drive the relays using only 3 GPIO pins.
As for the software, take a look at this program with a web interface with slide switches to turn on/off the relays over WiFi.
But ESP8266-01 has only 2 GPIO Pins and Arduino has 13 digital pins and 8 Analog Pins, I am asking to tell me the steps to convert a ESP8266-01 to WiFi Shield on Arduino because I know how to write codes on Arduino and make them work.
Please tell me how can I use ESP8266-01 as a shield to connect to wifi rather than a standalone device.
I am having a HC-05 Bluetooth Module and I know how to code it, tell me to use ESP8266-01 as a plug and play WiFi adapter for my Arduino.