Sistem Pengaman Motor Berbasis Wifi dengan ESP8266 07

Alat ini bekerjanya dengan cara melakukan scanning wifi dengan nama SSID dan password tertentu

IntermediateProtip1 hour259
Sistem Pengaman Motor Berbasis Wifi dengan ESP8266 07

Things used in this project

Hardware components

ESP8266 ESP-12E
Espressif ESP8266 ESP-12E
×1
Relay (generic)
×2
IC Regulator
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Code

sketch motor

Arduino
#include <ESP8266WiFiMulti.h>
ESP8266WiFiMulti WiFiMulti;
const int ledA = 13;  //power motor
const int ledB = 12;  //switch klakson
const int ledC = 14;  //indikator with blinking led

void setup(){
  pinMode(ledA, OUTPUT);
  pinMode(ledB, OUTPUT);
  pinMode(ledC, OUTPUT);
  digitalWrite(ledA, 0);    //matikan mesin
  digitalWrite(ledB, 1);    //matikan klakson
  
   delay(10000);   
      digitalWrite(ledB, 0); delay(100);  //nyalakan klakson indikator alat bekerja
      digitalWrite(ledB, 1); delay (400);
      digitalWrite(ledB, 0); delay(100);  
      digitalWrite(ledB, 1);              
      
    // set Wifi SSID dan password
    WiFiMulti.addAP("akusukakamu", "akujugasuka");
}

void loop()
{ 

 // scanning wifi dengan SSID dan password di atas
    if((WiFiMulti.run() == WL_CONNECTED))
    {
        digitalWrite(ledA, 1);              //nyalakan mesin
        }
        else 
    {
        digitalWrite(ledA, 0);              //matikan mesin
        }
    digitalWrite(ledC, 1); delay(200);
    digitalWrite(ledC, 0); delay(100);
    digitalWrite(ledC, 1); delay(300);
    digitalWrite(ledC, 0);
    delay(3000);
}

Credits

dirakit community

dirakit community

122 projects • 73 followers
Indonesia IoT Community
Sulis Priyanto

Sulis Priyanto

13 projects • 1 follower
Monalisa Arcelia

Monalisa Arcelia

9 projects • 5 followers

Comments

Add projectSign up / Login