



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




1 Lighting Control via Website 1.1.1 Introduction (Existing System, Problem Statement and Proposed System) 1.2 System Requirements and Cost No. Item Price Qty Subtotal 1 Nodemcu 20000 1 20000 2 Led 100 1 500 3 Jumper wire - 8 2500 4 Resistor 100 1 1000 Total 0 1.3 Design Consideration 1.3.1 Circuit Diagram
1.3.2 Calculation Voltage of Nodemcu = 3.3 V Voltage of LED = 2.1 V Current of LED = 20 mA Resistor = (Source Voltage- Load Voltage)/ Load Current = (3.3 V – 2.1 V) /20mA = 100 ohms (local market) 1.4 Implementation 1.4.1 Hardware Configuratio
digitalWrite(ledPin, HIGH); value = HIGH; } if (request.indexOf("/LED=OFF") != -1) { digitalWrite(ledPin, LOW); value = LOW; } // Set ledPin according to the request //digitalWrite(ledPin, value); // Return the response client.println("HTTP/1.1 200 OK"); client.println("Content-Type: text/html"); client.println(""); // do not forget this one client.println(""); client.println(""); client.print("Led is now: "); if(value == HIGH) { client.print("On"); } else { client.print("Off"); } client.println("
"); client.println("<a href="/LED=ON"">"); client.println("<a href="/LED=OFF"">
"); client.println(""); delay(1); Serial.println("Client disonnected"); Serial.println(""); }
1.4.3 Uploading the Code
[Reference: https://www.instructables.com/Internet-Controlled-LED-Using- NodeMCU/]