Hardware Required
- USB Cable - 1
- NodeMCU ESP8266 Cp2102 Wireless Module - 1
- Mini Two-Color Module - 1
- Bread Board 840 Point - 1
- Jumper Wire (male to female) - 40 pcs
- Single Stand Wire - 1
Introduction
In this project, we will control the Mini two color LED module using NodeMCU using Application.
HARDWARE REQUIRED
- USB Cable - 1
- NodeMCU ESP8266 Cp2102 Wireless Module - 1
- Mini Two-Color Module - 1
- Bread Board 840 Point - 1
- Jumper Wire (male to female) - 40 pcs
- Single Stand Wire - 1
SOFTWARE REQUIRED
Arduino IDE 1.8.5 (programmable platform for Arduino)
Click To Download :https://www.arduino.cc/en/Main/Software
SPECIFICATIONS
Mini Two-Color Module
This LED contains two light emitting diodes. One pin is the GND and the other two are for a red and green LED. By powering both GND and one of the pins you can see one of the colors. You can also power GND and both pins at the same time to mix the color and get a yellow/orange color.
NodeMCU ESP8266 Cp1202 Wireless Module
ESP8266EX offers a complete and self-contained Wi-Fi networking solution; it can be used to host the application or to offload Wi-Fi networking functions from another application processor. When ESP8266EX hosts the application, it boots up directly from an external flash. In has integrated cache to improve the performance of the system in such applications.
- NodeMCU ESP-12E dev board can be connected to 5Vusing micro USB connector or VIN pin available on board.
- The I/O pins of ESP8266 communicate or input/output max 3.3V only. I.e. the pins are NOT 5V tolerant inputs.
- In case you have to interface with 5V I/O pins, you need to use level conversion system (either built yourself using resistor voltage divider or using ready to use level converters.
ESP8266 NodeMcu Installation
STEP- 1 Installing Arduino Core for NodeMCU ESP-12E Using Arduino Boards Manager
As shown in the image, Copy the .json link with the latest stable release of NodeMCU package from
https://github.com/esp8266/Arduino#installing-with-boards-manager
The link should look something like this-
http://arduino.esp8266.com/stable/package_esp8266com_index.json
Step 2: Insert Link for .json NodeMCU Package Files into Arduino IDE
Paste the copied link and insert it in Arduino IDE using following sequence-
File -> Menu -> Preferences
Paste copied the link into the area shown in the black box in the above image. Close and restart the Arduino IDE.
Step 3: Tools - Boards Manager
Tools -> Boards manager and search for ESP8266 and install the libraries/files given under heading ESP8266 by ESP community.
Restart the Arduino IDE once again.
Troubleshooting:
If you get an error as shown in image below:
Just go back to Preferences, as shown in step-2 image.
- Here, you can see the location (Marked with red box) C:UsersREES52.COMAppDataLocalArduino15preferences.txt
- Go to this location and delete all JSON Packages from Arduino15 folder. Now, Back to Board Manager and search for ESP8266 you will surely find.
Step 4: Selecting NodeMCU Board in Arduino IDE
Go to Tools -> Boards (scroll down the list of boards) - Select NodeMCU 1.0 (ESP-12EModule).
Select the Port number at which you have connected NodeMCU. Rest of the settings can be left to default values.
CIRCUIT CONNECTION
- Connect Pin Red of Mini Two color Sensor with Pin D6 (GPIO 12) of NodeMCU.
- Connect GND of Mini Two color Sensor with GND of NodeMCU
- Connect Pin Green of Mini Two color Sensor with Pin D7 (GPIO 13) of NodeMCU.
CODE
https://drive.google.com/open?id=1bAL60jd2cuIzMSUJdgOb_6Yrd6zznYzJ
WORKING
Welcome to the NodeMCU Based Project which consists of the Mini Two Color Sensor Module. The basic working of the circuit is being described here. This module displays two colors Red and Green and also different variants of both colors mixed. After all, connections are done appropriately, then upload the code and open the Serial monitor. Now, copy and paste the given IP on Browser of Phone/System. Now, you can access the application.