Ashfaque KK
Created September 21, 2021 © MIT

Smart Extension Cord

Smart extension cord Is an iot product having Energy Management and IoT based power outlet controlling system in it

Beginner20 days93
Smart Extension Cord

Things used in this project

Story

Read more

Schematics

Schematics

Code

Code

C/C++
#include <Wire.h> 
#include <ESP8266WiFi.h>
#include "Adafruit_MQTT.h"
#include "Adafruit_MQTT_Client.h"
#include <ESP8266WebServer.h>
#include <LiquidCrystal_I2C.h>

/************************* WiFi router credentials *********************************/

#define WLAN_SSID       "XXXXX"
#define WLAN_PASS       "xxxxx"

/************************* nodmcu WiFi access point credentials *********************************/
const char *ssid = "Smart Extension"; // You can change it according to your ease
const char *password = "12345678"; // You can change it according to your ease
ESP8266WebServer server(80); // establishing server at port 80 (HTTP protocol's default port)
/************************* Adafruit.io Setup *********************************/

#define AIO_SERVER      "io.adafruit.com"
#define AIO_SERVERPORT  1883                   // use 8883 for SSL
#define AIO_USERNAME  "XXXX"
#define AIO_KEY       "xxxxx-xxxx-xxxxx-xxxx"

/************************* Some global variables ********************************/
LiquidCrystal_I2C lcd(0x27, 16, 2);  //(display address,columns,rows)

uint32_t prev=0;  //previous millis
uint32_t curr=0;  //current millis

float energy=0.0; //energy
float cost=0.0;  //electrisity cost
float power=0.0;
uint8_t internet;
uint32_t limit1,limit2,limit3;
uint8_t x1,x2,x3;
uint16_t PL=1500; //power limit minimum 500W
uint8_t R1pin = 16; //relay pin 1
uint8_t RS1 = 1; //relay 1 status

uint8_t R2pin = 14; //relay pin 2
uint8_t  RS2 = 1; //relay 2 status

uint8_t R3pin = 12; //relay pin 3
uint8_t RS3 = 1; //relay 3 status

uint8_t R4pin = 13; //relay pin 4
uint8_t  RS4 = 1; //relay 4 status

uint8_t Muxpin = 2; //mux selection pin

/************ Global State (you don't need to change this!) ******************/

// Create an ESP8266 WiFiClient class to connect to the MQTT server.
WiFiClient client;
// or... use WiFiClientSecure for SSL
//WiFiClientSecure client;

// Setup the MQTT client class by passing in the WiFi client and MQTT server and login details.
Adafruit_MQTT_Client mqtt(&client, AIO_SERVER, AIO_SERVERPORT, AIO_USERNAME, AIO_KEY);

/****************************** Feeds ***************************************/

// Setup a feed called 'photocell' for publishing.
// Notice MQTT paths for AIO follow the form: <username>/feeds/<feedname>
Adafruit_MQTT_Publish sw1status = Adafruit_MQTT_Publish(&mqtt, AIO_USERNAME "/feeds/sw1");
Adafruit_MQTT_Publish sw2status = Adafruit_MQTT_Publish(&mqtt, AIO_USERNAME "/feeds/sw2");
Adafruit_MQTT_Publish sw3status = Adafruit_MQTT_Publish(&mqtt, AIO_USERNAME "/feeds/sw3");

Adafruit_MQTT_Publish Energy = Adafruit_MQTT_Publish(&mqtt, AIO_USERNAME "/feeds/Energy");
Adafruit_MQTT_Publish Cost = Adafruit_MQTT_Publish(&mqtt, AIO_USERNAME "/feeds/Cost");

// Setup a feed called 'sw1' for subscribing to changes.
Adafruit_MQTT_Subscribe relay1 = Adafruit_MQTT_Subscribe(&mqtt, AIO_USERNAME "/feeds/sw1");
// Setup a feed called 'sw2' for subscribing to changes.
Adafruit_MQTT_Subscribe relay2 = Adafruit_MQTT_Subscribe(&mqtt, AIO_USERNAME "/feeds/sw2");
// Setup a feed called 'sw3' for subscribing to changes.
Adafruit_MQTT_Subscribe relay3 = Adafruit_MQTT_Subscribe(&mqtt, AIO_USERNAME "/feeds/sw3");
// Setup a feed called 'sw4' for subscribing to changes.
Adafruit_MQTT_Subscribe relay4 = Adafruit_MQTT_Subscribe(&mqtt, AIO_USERNAME "/feeds/sw4");
// Setup a feed called 'timer' for subscribing to changes.
Adafruit_MQTT_Subscribe timer1 = Adafruit_MQTT_Subscribe(&mqtt, AIO_USERNAME "/feeds/timer1");
Adafruit_MQTT_Subscribe timer2 = Adafruit_MQTT_Subscribe(&mqtt, AIO_USERNAME "/feeds/timer2");
Adafruit_MQTT_Subscribe timer3 = Adafruit_MQTT_Subscribe(&mqtt, AIO_USERNAME "/feeds/timer3");
// Setup a feed called 'powerlimit' for subscribing to changes.
Adafruit_MQTT_Subscribe PowerLimit = Adafruit_MQTT_Subscribe(&mqtt, AIO_USERNAME "/feeds/power-limit");
/*************************** Sketch Code ************************************/
// Bug workaround for Arduino 1.6.6, it seems to need a function declaration
// for some reason (only affects ESP8266, likely an arduino-builder bug).
void MQTT_connect();
void calculation();
void setup() {
  pinMode(R1pin,OUTPUT);
  pinMode(R2pin,OUTPUT);
  pinMode(R3pin,OUTPUT);
  pinMode(R4pin,OUTPUT);
  pinMode(Muxpin,OUTPUT);
  
  digitalWrite(R1pin,HIGH);
  digitalWrite(R2pin,HIGH);
  digitalWrite(R3pin,HIGH);
  digitalWrite(R4pin,HIGH);
 
 Serial.begin(115200);
 
   // initialize LCD
  lcd.init();
  // turn on LCD backlight                      
  lcd.backlight();
  // clears the display to print new message
  lcd.clear();
  
  // set cursor to first column, first row
  lcd.setCursor(0, 0);
  // print message
  lcd.print("Connecting to ");
  lcd.setCursor(0,1);
  lcd.print(WLAN_SSID);
  delay(2000);
  lcd.clear();
  
  // Connect to WiFi access point.
  /*Serial.println(); Serial.println();
  Serial.print("");
  Serial.println(WLAN_SSID);*/
  Serial.println("configur wifi Station Mode ");
 // lcd.autoscroll();
 //WiFi.mode(WIFI_STA);
  WiFi.begin(WLAN_SSID, WLAN_PASS);
  for(int i=0;i<20;i++){
  if(WiFi.status() != WL_CONNECTED) {
    delay(500);
    lcd.setCursor(i,0);
    lcd.print(".");
  }
  else
  { Serial.print("i= ");
    Serial.println(i);
    break;}
  }
  //lcd.noAutoscroll();
  if(WiFi.status() != WL_CONNECTED) {
      lcd.clear(); 
      lcd.setCursor(0, 0);
      lcd.print("WiFi Not Found");
    internet=0;
    softAp();
  }
  else{
  internet=1; 
      lcd.clear();
      lcd.setCursor(0, 0);
      lcd.print("WiFi Connected");
      delay(1000);
 /*     lcd.clear();
      lcd.setCursor(0, 0);
      lcd.print("IP address: ");
      lcd.setCursor(0, 1);
      lcd.print(WiFi.localIP()); */

  // Setup MQTT subscription for relay1 feed.
  mqtt.subscribe(&relay1);
  mqtt.subscribe(&relay2);
  mqtt.subscribe(&relay3);
  mqtt.subscribe(&relay4);
  mqtt.subscribe(&timer1);
  mqtt.subscribe(&timer2);
  mqtt.subscribe(&timer3);
  mqtt.subscribe(&PowerLimit);
  }
}


uint32_t lastmillis=millis(); //for power calculation
void loop() {


  // Ensure the connection to the MQTT server is alive (this will make the first
  // connection and automatically reconnect when disconnected).  See the MQTT_connect
  // function definition further below.
if(internet==1){

  MQTT_connect();
  // this is our 'wait for incoming subscription packets' busy subloop
  // try to spend your time here
if(internet==1){

  Adafruit_MQTT_Subscribe *subscription;
  while ((subscription = mqtt.readSubscription(5000))) {
    if (subscription == &relay1) {
      Serial.print(F("Got relay1: "));
      Serial.println((char *)relay1.lastread);
      RS1= atoi((char *)relay1.lastread);  // convert to a number
      digitalWrite(R1pin,RS1);
    }
    if (subscription == &relay2) {
      Serial.print(F("Got relay2: "));
      Serial.println((char *)relay2.lastread);
      RS2= atoi((char *)relay2.lastread);  // convert to a number
      digitalWrite(R2pin,RS2);
    }
     if (subscription == &relay3) {
      Serial.print(F("Got relay3: "));
      Serial.println((char *)relay3.lastread);
      RS3= atoi((char *)relay3.lastread);  // convert to a number
      digitalWrite(R3pin,RS3);
    }
     if (subscription == &relay4) {
      Serial.print(F("Got relay4: "));
      Serial.println((char *)relay4.lastread);
      RS4= atoi((char *)relay4.lastread);  // convert to a number
      digitalWrite(R4pin,RS4);
     }
      if (subscription == &timer1) { 
      limit1= atoi((char *)timer1.lastread);  // convert to a number
      limit1=limit1*1; //in sec
      Serial.print(F("Got timer limit: "));
      Serial.println(limit1);
      if(limit1!=0){
      x1=1;
      limit1=limit1+(millis()/1000);}
    }
       if (subscription == &timer2) { 
      limit2= atoi((char *)timer2.lastread);  // convert to a number
      limit2=limit2*60; //mult by 60 to get in min 
      Serial.print(F("Got timer limit: "));
      Serial.println(limit2);
      if(limit2 != 0){
      x2=1;
      limit2=limit2+(millis()/1000);}
    } 
      if (subscription == &timer3) { 
      limit3= atoi((char *)timer3.lastread);  // convert to a number
      limit3=limit3*60; //mult by 60 to get in min 
      Serial.print(F("Got timer limit: "));
      Serial.println(limit3);
      if(limit3 != 0){
      x3=1;
      limit3=limit3+(millis()/1000);}
    }   
      if (subscription == &PowerLimit) { 
      PL= atoi((char *)PowerLimit.lastread);  // convert to a number
      Serial.print(F("Got power limit: "));
      Serial.println(PL);
    }  
    }
    
curr=millis();
if(curr-prev >=10000){
  prev=curr;
if(RS1==0 || RS2==0 ||RS3==0 ||RS4==0){
calculation();
  // Now we can publish Power and Cost
Energy.publish(energy); 
Cost.publish(cost);}
}

   if(limit1<=(millis()/1000) && x1==1 && limit1!=0)
    {digitalWrite(R1pin,!digitalRead(R1pin));
     x1=0;
     int RS1=digitalRead(R1pin);
     Serial.print(F("changing the status of sw to state= "));
     Serial.print(RS1);
     // Now we can publish stuff!
     sw1status.publish(RS1);}
     
     if(limit2<=(millis()/1000) && x2==1 && limit2!=0)
    {digitalWrite(R2pin,!digitalRead(R2pin));
     x2=0;
     int RS2=digitalRead(R2pin);
     Serial.print(F("changing the status of sw to state= "));
     Serial.print(RS2);
     // Now we can publish stuff!
     sw2status.publish(RS2);}
        
    if(limit3<=(millis()/1000) && x3==1 && limit3!=0)
    {digitalWrite(R3pin,!digitalRead(R3pin));
     x3=0;
     int RS3=digitalRead(R3pin);
     Serial.print(F("changing the status of sw to state= "));
     Serial.print(RS3);
     // Now we can publish stuff!
     sw3status.publish(RS3);}
  
  // ping the server to keep the mqtt connection alive
  // NOT required if you are publishing once every KEEPALIVE seconds
  //Since there's no publish's in this code, you will have to ping every few minutes at least. Uncomment the ping code
 
 /* if(! mqtt.ping()) {
    mqtt.disconnect();
  } */
}

}
  if(internet==0)
  {server.handleClient();
curr=millis();
if(curr-prev >=2500){
prev=curr;
if(RS1==0 || RS2==0 ||RS3==0 ||RS4==0){
calculation();}
}
}
}


// Function to connect and reconnect as necessary to the MQTT server.
// Should be called in the loop function and it will take care if connecting.
void MQTT_connect() {
  int8_t ret;

  // Stop if already connected.
  if (mqtt.connected()) {
    return;
  }

  Serial.print("Connecting to MQTT... ");

  uint8_t retries = 2;
  while ((ret = mqtt.connect()) != 0) { // connect will return 0 for connected
       Serial.println(mqtt.connectErrorString(ret));
     //  Serial.println("Retrying MQTT connection in 5 seconds...");
       lcd.clear();
      lcd.setCursor(0, 0);
      lcd.print("Connection Lost");
      lcd.setCursor(0, 1);
      lcd.print("Retrying in 10s");
       mqtt.disconnect();
       delay(5000);  // wait 5 seconds
       retries--;
       if (retries == 0) {
        //Disconnecting from the Router
        internet=0;
        WiFi.disconnect(true);
        
         softAp();
         return;
       }
  }
  //Serial.println("MQTT Connected!");
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("MQTT Connected!");
  delay(500);
}


void softAp()
{

  Serial.print("Configuring access point...");
      lcd.clear(); 
      lcd.setCursor(0, 0);
      lcd.print("Configuring");
      lcd.setCursor(0, 1);
      lcd.print("Access Point...");
      delay(500);
  // You can remove the password parameter if you want the AP to be open. 
  WiFi.mode(WIFI_AP);
  WiFi.softAP(ssid, password); // --> This line will create a WiFi hotspot.

  IPAddress myIP = WiFi.softAPIP();
 // Serial.print(myIP);
 // Serial.println("AP IP address: ");
      lcd.clear(); 
      lcd.setCursor(0, 0);
      lcd.print("AP IP address: ");
      lcd.setCursor(0, 1);
      lcd.print(myIP);
 /*In order to handle incoming HTTP requests, we need to specify which code to execute when a particular URL is hit. 
    To do so, we use 'on' method. This method takes two parameters.First one is a URL path and second one is the name 
    of function which we want to execute when that URL is hit. */
  server.on("/", handle_OnConnect);
  server.on("/relay1", handle_relay1);
  server.on("/relay2", handle_relay2);
  server.on("/relay3", handle_relay3);
  server.on("/relay4", handle_relay4);
  server.on("/Disconnect", Disconnect);
  /* if the client requests any URL other than specified with server.on().
  It should respond with an HTTP status 404 (Not Found) and a message for the user */
  server.onNotFound(handle_NotFound);
  // to start our server, we call the begin method on the server object.
  server.begin();
  Serial.println("HTTP server started");
}


//creating the function we attached to root (/) URL with server.on.
void handle_OnConnect() {
  Serial.println("Home");
  
// use the send method,In order to respond to the HTTP request
  server.send(200, "text/html", SendHTML(RS1,RS2,RS3,RS4,energy,cost)); //arguments:(HTTP response code[200=success responce code], the content type,content)
}

void handle_relay1() {
  digitalWrite(R1pin,!digitalRead(R1pin));
  Serial.print("relay1 Status: ");
  RS1 = digitalRead(R1pin);
  Serial.println(RS1);
  server.send(200, "text/html", SendHTML(RS1,RS2,RS3,RS4,energy,cost)); 
}


void handle_relay2() {
  digitalWrite(R2pin, !digitalRead(R2pin));
  Serial.println("Relay 2 Status: ");
  RS2 = digitalRead(R2pin);
  Serial.println(RS2);
  server.send(200, "text/html", SendHTML(RS1,RS2,RS3,RS4,energy,cost)); 
}

void handle_relay3() {
  digitalWrite(R3pin, !digitalRead(R3pin));
  Serial.println("Relay 3 Status: ");
  RS3 = digitalRead(R3pin);
  Serial.println(RS3);
  server.send(200, "text/html", SendHTML(RS1,RS2,RS3,RS4,energy,cost)); 
}
  
 void handle_relay4() {
  digitalWrite(R4pin, !digitalRead(R4pin));
  Serial.println("Relay 4 Status: ");
  RS4 = digitalRead(R4pin);
  Serial.println(RS4);
  server.send(200, "text/html", SendHTML(RS1,RS2,RS3,RS4,energy,cost));
}

void Disconnect() {
//Disconnect stations from the network established by the soft-AP.
WiFi.softAPdisconnect(true);
 /* #ESP8266 have the watchdog timer turned on by default.
    #Watchdog - if the code locks up, staying too long in a loop or processing any other task without 
     any pauses, which would prevent vital processes like Wi-Fi communication from running. 
    #bootloader provided with the SDK( SDK is part of esp8266 / arduino core
     loaded to module together with your application)does feed the watchdog . */
//basically die and wait for software WDT to reset the sysem
   while (1);
}

void handle_NotFound(){
  server.send(404, "text/plain", "Not found");
}

/************************* HTML page *********************************/
String SendHTML(uint8_t RS1,uint8_t RS2,uint8_t RS3,uint8_t RS4,float Po,float Co){
  String pg = "<!DOCTYPE html> <html>\n";
  pg +="<head><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, user-scalable=no\">\n";
  pg +="<title>Relay Control</title>\n";
  pg +="<style>html { font-family: Helvetica; display: inline-block; margin: 0px auto; text-align: center;}\n";
  pg +="body{margin-top: 50px;} h1 {color: #444444;margin: 50px auto 30px;} h3 {color: #444444;margin-bottom: 50px;}\n";
  pg +=".button {display: block;width: 80px;background-color: #1abc9c;border: none;color: white;padding: 13px 30px;text-decoration: none;font-size: 25px;margin: 0px auto 35px;cursor: pointer;border-radius: 4px;}\n";
  pg +=".buttondis {background-color: #4CAF50; border: none;color: white;padding: 2px 7px;text-align: center;text-decoration: none;display:inline-block;font-size: 11px;display: inline-block;margin: 2px 2px;transition-duration: 0.4s;cursor: pointer;border-radius: 8px}\n";
  pg +=".buttondis {background-color: white;color: black;border: 2px solid #e7e7e7;}\n";
  pg +=".buttondis:hover {background-color: #e7e7e7;}\n";
  pg +=".button-on {background-color: #1abc9c;}\n";
  pg +=".button-on:active {background-color: #16a085;}\n";
  pg +=".button-off {background-color: #34495e;}\n";
  pg +=".button-off:active {background-color: #2c3e50;}\n";
  pg +="p {font-size: 14px;color: #888;margin-bottom: 10px;}\n";
  pg +=".cost-text{font-weight: 600;color: #444444;padding-left: 15px; padding-right: 15px;font-size: 30px;width: 60px;text-align: left;}\n";
  pg +=".cost{font-weight: 300;font-size: 60px;color: #3498db;}\n";
  pg +=".power-text{font-weight: 600;color: #444444; padding-left: 15px;padding-right: 15px;font-size: 30px;width: 85px;text-align: left;}\n";
  pg +=".power{font-weight: 300;font-size: 60px;color: #f39c12;}\n";
  pg +=".side-by-side{display: inline-block;vertical-align: middle;position: relative;}\n";
  pg +=".elecsymbol{font-size: 17px;font-weight: 600;position: absolute;right: -30px;top: 15px;}\n";
  pg +=".powersymbol{font-size: 17px;font-weight: 600;position: absolute;right: -40px;top: 15px;}\n";
  pg +="</style>\n";

  pg +="<script>\n";
  pg +="setInterval(loadDoc,1000);\n";
  pg +="function loadDoc() {\n";
  pg +="var xhttp = new XMLHttpRequest();\n";
  pg +="xhttp.onreadystatechange = function() {\n";
  pg +="if (this.readyState == 4 && this.status == 200) {\n";
  pg +="document.getElementById(\"page\").innerHTML =this.responseText}\n";
  pg +="};\n";
  pg +="xhttp.open(\"GET\", \"/\", true);\n";
  pg +="xhttp.send();\n";
  pg +="}\n";
  pg +="</script>\n";
  pg +="</head>\n";
  pg +="<body>\n";
pg +="<div id=\"page\">\n";
  pg +="<h1>ESP8266 Web Server</h1>\n";
  pg +="<h3>Smart Extension Cord</h3>\n";
  pg +="<div class=\"side-by-side power-text\">Energy:</div>\n";
  pg +="<div class=\"side-by-side power\">";
  pg +=(float)Po;
  pg +="<span class=\"powersymbol\">KWh</span></div>\n";
  pg +="<div >\n";
  pg +="<div class=\"side-by-side cost-text\">Cost:</div>\n";
  pg +="<div class=\"side-by-side cost\">";
  pg +=(float)Co;
  pg +="<span class=\"elecsymbol\">Rs</span></div>\n";
  pg +="</div>\n";
  //pg +="</div>\n";

  pg +="<div id=\"controls\" style=\"margin-top: 50px;\">\n";
   if(RS1)
  {pg +="<p>Relay1 Status: OFF</p><a class=\"button button-off\" href=\"/relay1\">OFF</a>\n";}
  else
  {pg +="<p>Relay1 Status: ON</p><a class=\"button button-on\" href=\"/relay1\">ON</a>\n";}

  if(RS2)
  {pg +="<p>Relay2 Status: OFF</p><a class=\"button button-off\" href=\"/relay2\">OFF</a>\n";}
  else
  {pg +="<p>Relay2 Status: ON</p><a class=\"button button-on\" href=\"/relay2\">ON</a>\n";}

  if(RS3)
  {pg +="<p>Relay3 Status: OFF</p><a class=\"button button-off\" href=\"/relay3\">OFF</a>\n";}
  else
  {pg +="<p>Relay3 Status: ON</p><a class=\"button button-on\" href=\"/relay3\">ON</a>\n";}

  if(RS4)
  {pg +="<p>Relay4 Status: OFF</p><a class=\"button button-off\" href=\"/relay4\">OFF</a>\n";}
  else
  {pg +="<p>Relay4 Status: ON</p><a class=\"button button-on\" href=\"/relay4\">ON</a>\n";}
 pg +="<a class=\"buttondis buttondis\" href=\"/Disconnect\">Disconnect</a>\n";
  pg +="</div>\n";
 pg +="</div>\n";
  pg +="</body>\n";
  pg +="</html>\n";
  return pg;
}

void calculation(){
//calculating voltage  
 lastmillis=millis();
int16_t Smin=1023; //sample minimum
int16_t Smax=0;   //sample maximum
float Sm;        //peak sample
 int16_t sensorValue;
float Veff=0.0;   //Vrms
float Ieff=0.0;  //Irms
digitalWrite(Muxpin,LOW);
for ( int j = 0; j < 5; j++ ){  
for ( int i = 0; i < 100; i++ ) {
 sensorValue = analogRead(A0);
//finding the minimum andd maximum range of waveform
 Smax=max(sensorValue,Smax);   
 Smin=min(sensorValue,Smin);
    delay(1);
  }
  Sm=(Smax-Smin)/2;
  Veff=Veff+((Sm/sqrt(2))*2.51                  );  //2.51-->(meter measured Trms/sensor measured value) calibration constant
  Smax=0;
  Smin=1023;
  }
Veff=Veff/5.00;
if(Veff<50){Veff=0;}

Serial.println(Veff);  
/*lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Voltage: "+String(Veff));*/
Sm=0;


//calculating current
digitalWrite(Muxpin,HIGH);

for ( int i = 0; i < 100; i++ ) {
 sensorValue = analogRead(A0) - 497;
// maximum value
 Smax=max(sensorValue,Smax);   
    delay(1);
  }
    Sm= Smax*3.2226;         //3.3v/1024=3.222 mv per count
    Ieff=(Sm/sqrt(2))/66*1.56;    //this is Irms ,sensor have 66mv/amp sensitivity
    if(Smax<20){Ieff=0;}                

  Serial.println(Ieff);
  /*lcd.setCursor(0, 1);
  lcd.print("Current: "+String(Ieff));*/
  
  power=Veff*Ieff;      //Instantaneous Power
  Serial.println("power:"+String(power));
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("Power: "+String(power));
  
  float curr_energy=power*((millis()-lastmillis)/3600000000.0);  // power*[millisec/(1000*60*60)]/1000 =KWH
  energy+=curr_energy;
  //Serial.println("Energy:"+String(energy));
  
  cost+=3.7*curr_energy;
  Serial.println("cost:"+String(cost));
  lcd.setCursor(0, 1);
  lcd.print("Cost: "+String(cost));
  if(power>PL){digitalWrite(R1pin,HIGH);digitalWrite(R2pin,HIGH);digitalWrite(R3pin,HIGH);digitalWrite(R4pin,HIGH);}
}

Credits

Ashfaque KK
5 projects • 3 followers
Contact

Comments

Please log in or sign up to comment.