wifi modules | Botshop
IOT modules with NodeMCU with ESP8266 WiFI part 1

IOT modules with NodeMCU with ESP8266 WiFI part 1

The ESP8266 WiFi chip

The first thing you need to know is that the ESP8266 WiFi chip is much more than just a WiFi chip. It also includes its own microprocessor, 16 input/output pins, 64 KiB of instruction RAM and 96 KiB of data RAM.

The ESP8266 wifi chip can me run as a serial device from an Arduino but it can also be used as a stand-alone device!

You can use this chip on a breakout board with a couple of components to create a stand-alone Internet Of Things device. This is much more cost effective than an Arduino with a WiFi shield. IOT esp8266 WifI devices became very popular these days because of the amazing benefits included in the ESP chip.

Thanks to the guys who ported the Esp8266 into Arduino IDE and helping all the Arduino users to easily program the ESP8266.

Most of this NobeMCU part 1 post discusses how to install the Esp8266 support for the Arduino and then a short script on how to blink a LED (the hello world in the electronics).

Firstly open the Arduino IDE and then go to the file menu and click on the preference sub menu in the Arduino IDE

Copy the below link into the Additional boards Manager URLs

http://arduino.esp8266.com/stable/package_esp8266com_index.json

Click OK to continue.

After completing the above steps , go to Tools -> board, and then select Boards Manager

Search for ESP8266 in the search bar and install “ESP8266 by ESP8266 Community”.

Once all the above are completed we are ready to program our esp8266 with Arduino IDE.

For this example I have used NodeMCU esp8266, if you are using any other vendor wifi chips or generic wifi module please check with the esp8266 Pin mapping which is very essential to make things works.

The reason why I used D7 pin for this example is , I uploaded the basic blink program that comes with the examples program in the arduino IDE which is connected with 13 pin of arduino. The 13th pin is mapped into D7 pin of NodeMCU.

Go to the tools menu and then the board sub menu and select the type of esp8266 you are using and select the correct COM port to run the program on your esp8266 device. For the Node MCU, select NodeMCU 1.0 (ESP-12E Module)

 

void setup() {
// initialize digital pin 13 as an output.
pinMode(13, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(13, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}

Part 2 of this block post can be found here.