Irsalina Santi Khasanah
Published

Sangkar Burung Pintar

sangkar burung pintar adalah project penjemuran burung secara otomatis melalui penjadwalan sesuai kebutuhan,

EasyWork in progress2 hours124
Sangkar Burung Pintar

Things used in this project

Hardware components

Breadboard (generic)
Breadboard (generic)
×1
NodeMCU ESP8266 Breakout Board
NodeMCU ESP8266 Breakout Board
×1
DC motor (generic)
×2
Relay (generic)
×2
9V battery (generic)
9V battery (generic)
×1
Jumper wires (generic)
Jumper wires (generic)
×20

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

obeng

Story

Read more

Schematics

Schema Sangkar burung pintar

Schema  nryhuf3f6n

Code

Code Sangkar Burung Pintar

C/C++
#include <Time.h>
#include <TimeLib.h>
int relay1 = 2;
int relay2 = 4;

void setup() {
  Serial.begin(9600);
  setTime(08,00,00,13,8,17); //set jam
  pinMode(relay1, OUTPUT);
  pinMode(relay2, OUTPUT);

  digitalWrite(relay1,HIGH);
  digitalWrite(relay2,HIGH);
}

void loop() {
  Serial.println(second());
  delay(1000);
  if(hour()== 7 and minute() == 0 and second() == 0){
    digitalWrite(relay1,LOW);
    delay(1000); //motor berputar selama 1 dtk
    digitalWrite(relay1,HIGH);
    delay(10000); //sangkar dijemur selama 10 dtk
    digitalWrite(relay2,LOW);
    delay(1000); //motor berputar selama 1 dtk
    digitalWrite(relay2,HIGH);
  }

}

Credits

Irsalina Santi Khasanah

Irsalina Santi Khasanah

1 project • 0 followers

Comments

Add projectSign up / Login