IOT modules with NodeMCU with ESP8266 WiFI part 1

[et_pb_section admin_label="section" transparent_background="off" allow_player_pause="off" inner_shadow="off" parallax="off" parallax_method="on" padding_mobile="off" make_fullwidth="off" use_custom_width="off" width_unit="off" custom_width_px="1080px" custom_width_percent="80%" make_equal="off" use_custom_gutter="off" fullwidth="off" specialty="off" disabled="off"][et_pb_row admin_label="row" make_fullwidth="off" use_custom_width="off" width_unit="off" custom_width_px="1080px" custom_width_percent="80%" use_custom_gutter="off" gutter_width="3" padding_mobile="off" allow_player_pause="off" parallax="off" parallax_method="on" make_equal="off" column_padding_mobile="on" parallax_1="off" parallax_method_1="on" parallax_2="off" parallax_method_2="on" parallax_3="off" parallax_method_3="on" parallax_4="off" parallax_method_4="on" disabled="off"][et_pb_column type="4_4"][et_pb_text admin_label="Text" background_layout="light" text_orientation="left" use_border_color="off" border_style="solid" disabled="off" border_color="#ffffff"]

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
[/et_pb_text][et_pb_image admin_label="Image" src="//www.botshop.co.za/wp-content/uploads/2016/11/preference.png" show_in_lightbox="off" url_new_window="off" use_overlay="off" sticky="off" align="left" force_fullwidth="off" always_center_on_mobile="on" use_border_color="on" border_color="#000000" border_style="solid" custom_margin="50px|||" disabled="off" animation="off"] [/et_pb_image][et_pb_text admin_label="Text" background_layout="light" text_orientation="left" use_border_color="off" border_style="solid" custom_margin="50px|||" disabled="off" border_color="#ffffff"]
Copy the below link into the Additional boards Manager URLs
http://arduino.esp8266.com/stable/package_esp8266com_index.json
Click OK to continue.
[/et_pb_text][et_pb_image admin_label="Image" src="//www.botshop.co.za/wp-content/uploads/2016/11/board-manager.png" show_in_lightbox="off" url_new_window="off" use_overlay="off" sticky="off" align="left" force_fullwidth="off" always_center_on_mobile="on" use_border_color="off" border_color="#ffffff" border_style="solid" custom_margin="50px|||" disabled="off" animation="off"] [/et_pb_image][et_pb_text admin_label="Text" background_layout="light" text_orientation="left" use_border_color="off" border_style="solid" custom_margin="50px|||" disabled="off"]
After completing the above steps , go to Tools -> board, and then select Boards Manager
[/et_pb_text][et_pb_image admin_label="Image" src="http://1.bp.blogspot.com/-njmbyb_yr_U/VnPuv7WAjRI/AAAAAAAAAus/nj0gR7SyFuE/s1600/board%2Bmanager%2Bopen.PNG" show_in_lightbox="off" url_new_window="off" use_overlay="off" sticky="off" align="left" force_fullwidth="off" always_center_on_mobile="on" use_border_color="off" border_color="#ffffff" border_style="solid" disabled="off" animation="off"] [/et_pb_image][et_pb_text admin_label="Text" background_layout="light" text_orientation="left" use_border_color="off" border_style="solid" disabled="off"]
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.
[/et_pb_text][et_pb_image admin_label="Image" src="http://3.bp.blogspot.com/-qYY0XGJiYFo/VnPwPEkNq9I/AAAAAAAAAu4/NPbST-BezFY/s1600/blink_bb.jpg" show_in_lightbox="off" url_new_window="off" use_overlay="off" sticky="off" align="left" force_fullwidth="off" always_center_on_mobile="on" use_border_color="off" border_color="#ffffff" border_style="solid" disabled="off" animation="off"] [/et_pb_image][et_pb_text admin_label="Text" background_layout="light" text_orientation="left" use_border_color="off" border_style="solid" disabled="off" border_color="#ffffff"]
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.
[/et_pb_text][/et_pb_column][/et_pb_row][/et_pb_section]
The cookie settings on this website are set to 'allow all cookies' to give you the very best experience. Please click Accept Cookies to continue to use the site.
You have successfully subscribed!
This email has been registered