Automate your house hold appliances with this simple tutorial. With open source softwares and components available in plenty , create your own creative DIY‘s.
The tutorial provides you with step by step process of creating android app and controlling home appliances over internet using ESP8266 wifi chip.
- Node MCU V1.0 or ESP8166-12E
- USB Data Cable
- Wifi Network Acess(Home wifi router)
While going through this tutorial a little familiarity with Arduino is required. The programming code is be written for ESP8266 wifi chip using Arduino IDE, for which installation of ESP8266 library is required. Click here to setup library for ESP.
Inthis tutorial NodeMCU V1.0 has been used, which is ESP8266 breakout board with usb-ttl option. This provides for easy connection to your PC and arduino IDE. If you are connecting Node MCU board for the first time you would require usb drivers. These drivers could be download by clicking here.
After Connecting Node MCU(Multi-point Control unit) to PC , open Arduino IDE, set com port and choose NODE MCU 1.0 from board as circled in the image below.
Copy the below code to IDE.
In the above code mention the wifi network SSID and Password as shown below:
const char* ssid = “You WIFI SSID Name”;
const char* password = “your wifi password”;
Compile and Upload code to Node MCU(Multi-point Control unit) and this brings us to the end of coding part.
Now, Open Serial Terminal of Arduino IDE and press reset button on ESP8266. Now it will connect to your wifi network and show you an IP address in terminal.
Go to your browser enter URL like below
http://YourESP8266IPAddress/gpio/0 will set the GPIO2 low,
http://YourESP8266IPAddress/gpio/1 will set the GPIO2 High,
You can observe that the Node MCU(Multi-point Control unit) LED toggles between on and off when you press the above URL.
Stay tuned to the Part II of this tutorial soon.
Courtsey: Control home appliances Part I