/**/
Getting Started With ESP8266 – Your First IOT Project Reviewed by Momizat on . If IOT(Internet Of things) word is buzzing your ear every day, and you are anxious to get started with this, then you are at right place. In this article, We wi If IOT(Internet Of things) word is buzzing your ear every day, and you are anxious to get started with this, then you are at right place. In this article, We wi Rating:
You Are Here: Home » IOT » Getting Started With ESP8266 – Your First IOT Project

Getting Started With ESP8266 – Your First IOT Project






If IOT(Internet Of things) word is buzzing your ear every day, and you are anxious to get started with this, then you are at right place. In this article, We will learn how to connect and talk with your things (like sensor, relay) from the internet using PC or IOS/Android App.

Choosing Right Hardware and Software for your First IOT Project:
[InsertAddForPost_square]
Communication Method:

  1. Wifi
  2. Ethernet

IOT Protocols:

  1. HTTP
  2. MQTT(will read about it next chapter)

Hardware:

  1. ESP8266(Wifi Module)
  2. ENC28J60 Ethernet Module

In this tutorial, we will use NodeMCU which is an ESP8266 based development board. NodeMCU looks like bellow image.
Buy Here:

Fig. 1 Node MCU

Fig. 1 Node MCU

You can read about NodeMCU here.

There are two types of programming language you can use to program Esp8266.

  1. LUA
  2. C++ using Arduino Library
  3. C using ESP SDK

But as we are all familiar with Arduino, we will focus on Arduino to keep this tutorial simple.

Here is another tutorial describing steps to install Arduino library for ESP8266.

Once you have installed Arduino library, open Arduino go to File→ example→ ESP8266WIFI→ wifiWebServer.ino

You can see some example code like bellow.

 

replace the code with your wifi SSID and Password

 

 

Connect NodeMCU 1.0 to your PC and Go to Tool → Board→ NodeMCU 1.0 (ESP-12E Module)

It will ask for USB-TTL driver, you can download the driver from here.

Once the driver is installed, choose your serial port on which NodeMCU is connected.

1

Fig. 2 – Arduino IDE Board and Port

Now compile and upload code to NodeMCU, once upload is complete open serial monitor of Arduino

You will see a bunch of messages, like bellow, you will see, NodeMcu will get connected to your local wifi network and it will be assigned with one ip address.

2

Fig.3 Running WebServer

Now open your browser and  hit bellow URL.

http://192.168.1.103/gpio/1

http://192.168.1.103/gpio/0

You can make led on/off by hitting URL above, On NodeMCU board gpio 2 is connected to one LED. your first IOT project is up and running.

[InsertAddForPost]

Now your turn put some imagination, add relay, motor, etc  to gpio of NodeMCU and make your home control from your PC or directly from your browser.

On the next tutorial, I will guide you to make a simple Android App using phone gap, using which you can turn on or off your home appliances.

 

Buy Here:






About The Author

I am a maker, who loves to think, hack and build new electronics stuff, I always find time to document , share my knowledge with others. I am graduate in BTech(Electronics and Communication Engineering).

Number of Entries : 36
Scroll to top