This is a project for the MSD (Microcontroller Based System Design) Lab, which is taken in AUST in 3rd year 2nd semester. We are building a system whrer anyone can control their home light/fan with their android smart phone from anywhere around the wrold. We have also implemented PIR sensor, which detects movement and automatically turn the light on.
Video demo: YouTube
- Arduino
- Android studio
- NodeMCU esp8266 WiFi module
- Java, PHP, MySql
- Arduino Mega/uno (In the project arduino mega was used, and the code is for that, but any arduino will do)
- NodeMCU esp8266 wifi module (you can buy it from TechshopBD)
- Android phone for android app
- A relay to control the A\C current with the arduino and wifi module. (In the project 4 relay was used)
- Go to preference in arduino software and add "http://arduino.esp8266.com/stable/package_esp8266com_index.json" this link in the 'Additional Boards Manager URLs' box. (without ")
- Then goto Tools>Board>Boards Manager and search for 'nodemcu esp8266'. Install the driver named 'esp8266 by ESP8266 Community'. Try to download the latest version. By the time of this writting it was 2.4.2 .
- Now to select the board goto Tools>Board and scroll down a little bit and select 'NodeMCU 1.0(ESP-12E Module)'. There is another one named 'NodeMCU 0.9' but we will use the 1.0 12E version.
- Change the 'ssid' and 'password' variables with your own wifi name and password.
- A library name 'ArduinoJson' is required for running the code. So if you already have it, then you are good to go, otherwise install it by following the instructions on 'arduinojson' website
That's it, you are ready to run code in the wifi module.
The details description can be found here