Create a smart light using a Node_MCU dev kit: NodeMCU 1.0(ESP-12E Module) consists of only one ADC(analog to digital converter) pin which is the A0 pin. We connect the LDR sensor to A0 pin and LED to any GPIO pin. According to the value read by the LDR sensor we can manually set the value beyond which it will be considered as dark and the LED is turned ON accordingly. The connections are as shown in the image. We used a bread board, male to female and male to male jumper wires to set up the connection. We upload a client program to the NodeMCU using USB which sends data (ie LDR value) to our server using the ESP8266 station. We used an Apache HTTP server. Send the data to the database using PHP. Run the PHP file in the location /var/www/html and create your databse in MariaDB or MySql. Resistors of 330 Ohm is connected in series with the Red LED, 10k Ohm resistor acts as a voltage divider and is connected to the LDR as shown in image.
-
Notifications
You must be signed in to change notification settings - Fork 0
SushmitaSingh96/Smart_Light
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Create a smart light using a Node_MCU dev kit
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published