Translate

Automatic Pet Feeder dengan Input Waktu via Handphone

Automatic Pet Feeder dengan Input Waktu via Handphone

           Pada kesempatan kali ini saya akan menjelaskan mengenai bagaimana cara membuat sebuah alat yang dapat digunakan untuk memberi pakan hewan dengan fitur bisa input waktu menggunakan handphone android. alat ini berbasis arduino dengan media transfer data melalui bluetooth. untuk lebih jelasnya berikut adalah daftar komponen dan programnya 


a. Arduino Uno

 

b. Bluetooth HC-05

 

c. Mini Servo


 

d. Lcd + I2C


e. Motor Stepper

 

f. RTC DS3231



g. Program Android



 

 

h. Program Arduino IDE

#include <Wire.h>  // i2C Conection Library
#include <LiquidCrystal_I2C.h>  //i2C LCD Library
#include <Servo.h>
#include <DS3231.h>
#define DS3231_I2C_ADDRESS 0x68

LiquidCrystal_I2C lcd(0x27, 16, 2); //lcd masuk ke pin sda dan scl arduino

DS3231  rtc(SDA, SCL);

//pin stepper masuk ke pin 8,10,11,12
int IN1 = 8;
int IN2 = 10;
int IN3 = 11;
int IN4 = 12;
int delaytime = 10; //makin kecil delay, makin cepat motor berputar
int i;

int mark;
String dataku;
int jampagi;
int jamsore;
int jammalam;
int delayjampagi;
int delayjamsore;
int delayjammalam;

Servo myservo1;
Time t;

void setup()
{
  pinMode(IN1,OUTPUT);
  pinMode(IN2,OUTPUT);
  pinMode(IN3,OUTPUT);
  pinMode(IN4,OUTPUT);

  myservo1.attach(9); //servo masuk ke pin 9 arduino
  myservo1.write(10);
 
  Serial.begin(9600);
  lcd.begin();
  lcd.clear();
  //lcd.noCursor();
 
  rtc.begin();
 
  // The following lines can be uncommented to set the date and time
  //rtc.setDOW(WEDNESDAY);     // Set Day-of-Week to WEDNESDAY
  //rtc.setTime(13, 11, 0);     // Set the time to 12:00:00 (24hr format)
  //rtc.setDate(23, 06, 2021);   // Set the date to January 16st, 2021
 
}

void loop()
{
 
  t = rtc.getTime();
 
  lcd.setCursor(0, 0);
  lcd.print(t.hour, DEC);
  lcd.print(":");
  lcd.print(t.min, DEC);
  lcd.print(":");
  lcd.print(t.sec, DEC);
  lcd.print("   ");
 
delay (1000);
   
if (Serial.available() > 0)
{

dataku = Serial.readString();

if(dataku.startsWith("x"))
{
   dataku.replace("x", "");
   jampagi = dataku.toInt();
}

if(dataku.startsWith("y"))
{
   dataku.replace("y", "");
   jamsore = dataku.toInt();
}

if(dataku.startsWith("z"))
{
   dataku.replace("z", "");
   jammalam = dataku.toInt();
}

if(dataku.startsWith("a"))
{
   dataku.replace("a", "");
   delayjampagi = dataku.toInt();
}

if(dataku.startsWith("b"))
{
   dataku.replace("b", "");
   delayjamsore = dataku.toInt();
}

if(dataku.startsWith("c"))
{
   dataku.replace("c", "");
   delayjammalam = dataku.toInt();
}

  lcd.setCursor(0, 1);
  lcd.print(jampagi);
  lcd.print("/");
  lcd.print(jamsore);
  lcd.print("/");
  lcd.print(jammalam);
  lcd.print("    ");

  lcd.setCursor(10,1);
  lcd.print(delayjampagi/1000);
  lcd.print("/");
  lcd.print(delayjamsore/1000);
  lcd.print("/");
  lcd.print(delayjammalam/1000);
  lcd.print("    ");
   
}

if((t.hour == jampagi)&&(mark == 0)){
myservo1.write(40); //buka servo
delay(delayjampagi);
myservo1.write(10); //tutup servo
mark = 1;
//stepper putar 4*100 step
for ( i=0; i<100; i++){
maju();
}
}

if((t.hour == jamsore)&&(mark == 1)){
myservo1.write(40); //buka servo
delay(delayjamsore);
myservo1.write(10); //tutup servo
mark = 2;
//stepper putar 4*100 step
for ( i=0; i<100; i++){
maju();
}
}

if((t.hour == jammalam)&&(mark == 2)){
myservo1.write(40); //buka servo
delay(delayjammalam);
myservo1.write(10); //tutup servo
mark = 0;
//stepper putar 4*100 step
for ( i=0; i<100; i++){
maju();
}
}
 
}

void maju(){
//step 4
step1();
delay(delaytime);
//step 3
step2();
delay(delaytime);
//step 2
step3();
delay(delaytime);
//step 1
step4();
delay(delaytime);
}

void mundur(){
//step 4
step4();
delay(delaytime);
//step 3
step3();
delay(delaytime);
//step 2
step2();
delay(delaytime);
//step 1
step1();
delay(delaytime);
}

void step1(){
digitalWrite(IN1,LOW);
digitalWrite(IN2,LOW);
digitalWrite(IN3,HIGH);
digitalWrite(IN4,HIGH);
}
void step2(){
digitalWrite(IN1,HIGH);
digitalWrite(IN2,LOW);
digitalWrite(IN3,LOW);
digitalWrite(IN4,HIGH);
}
void step3(){
digitalWrite(IN1,HIGH);
digitalWrite(IN2,HIGH);
digitalWrite(IN3,LOW);
digitalWrite(IN4,LOW);
}
void step4(){
digitalWrite(IN1,LOW);
digitalWrite(IN2,HIGH);
digitalWrite(IN3,HIGH);
digitalWrite(IN4,LOW);
}



i. VIDEO HASILNYA



 

 

AUDIOMETRI (Alat Test / Cek Pendengaran) ARDUINO

 Membuat Alat Audiometri (Alat Test / Cek Pendengaran) Menggunakan Arduino


    ()       Pada kesempatan kali ini saya akan menjelaskan mengenai bagaimana cara membuat sebuah alat yang digunakan untuk melakukan test pendengaran seseorang, alat ini menggunakan arduino dan outputnya menggunakan headset. interface alat ini menggunakan LCD dan kendali menggunakan 4 buah pushbutton. untuk lebih jelasnya berikut adalah program dan daftar komponennya.


a. Arduino Uno




b. LCD I2C




c. Headset




d. Program Arduino IDE

#include <PWM.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,20,4);

int bt1 = 7;
int bt2 = 6;
int bt3 = 5;
int bt4 = 4;

int bt1x = 0;
int bt2x = 0;
int bt3x = 0;
int bt4x = 0;
int cacah = 1;

//use pin 11 on the Mega instead, otherwise there is a frequency cap at 31 Hz
int pwmpin = 9;         // the pin that the LED is attached to
int duty = 125;         // duty cycle


void setup()
{
  lcd.begin();  
  lcd.clear(); 
  
  pinMode(bt1,INPUT_PULLUP);
  pinMode(bt2,INPUT_PULLUP);
  pinMode(bt3,INPUT_PULLUP);
  pinMode(bt4,INPUT_PULLUP);
  
  InitTimersSafe();
  Serial.begin(9600);
 
}

void loop()
{
  
  bt1x = digitalRead(bt1);
  bt2x = digitalRead(bt2);
  bt3x = digitalRead(bt3);
  bt4x = digitalRead(bt4);
  
  if(bt1x == 0){
  delay(200);  
  cacah++;
  }
  
  if(bt2x == 0){
  delay(200);  
  cacah--;
  }
  
  if(cacah < 1){
    cacah = 1;
  }
  
  if(cacah > 9){
    cacah = 9;
  }
  
  if((cacah == 1)&&(bt3x == 0)){
  mode1();
  }
  if((cacah == 2)&&(bt3x == 0)){
  mode2();
  }
  if((cacah == 3)&&(bt3x == 0)){
  mode3();
  }
  if((cacah == 4)&&(bt3x == 0)){
  mode4();
  }

  if((cacah == 5)&&(bt3x == 0)){
  mode5();
  }
  if((cacah == 6)&&(bt3x == 0)){
  mode6();
  }
  if((cacah == 7)&&(bt3x == 0)){
  mode7();
  }
  if((cacah == 8)&&(bt3x == 0)){
  mode8();
  }
  
  if(cacah == 1){
  lcd.setCursor(0,0);
  lcd.print(">20 DB");
  lcd.setCursor(0,1);
  lcd.print(" 30 DB");
  lcd.setCursor(0,2);
  lcd.print(" 40 DB");
  lcd.setCursor(0,3);
  lcd.print(" 50 DB");
  
  lcd.setCursor(12,0);
  lcd.print(" 60 DB");
  lcd.setCursor(12,1);
  lcd.print(" 70 DB");
  lcd.setCursor(12,2);
  lcd.print(" 80 DB");
  lcd.setCursor(12,3);
  lcd.print(" 90 DB");  
  }
  
  
  if(cacah == 2){
  lcd.setCursor(0,0);
  lcd.print(" 20 DB");
  lcd.setCursor(0,1);
  lcd.print(">30 DB");
  lcd.setCursor(0,2);
  lcd.print(" 40 DB");
  lcd.setCursor(0,3);
  lcd.print(" 50 DB");
  
  lcd.setCursor(12,0);
  lcd.print(" 60 DB");
  lcd.setCursor(12,1);
  lcd.print(" 70 DB");
  lcd.setCursor(12,2);
  lcd.print(" 80 DB");
  lcd.setCursor(12,3);
  lcd.print(" 90 DB");  
  }
  
  if(cacah == 3){
  lcd.setCursor(0,0);
  lcd.print(" 20 DB");
  lcd.setCursor(0,1);
  lcd.print(" 30 DB");
  lcd.setCursor(0,2);
  lcd.print(">40 DB");
  lcd.setCursor(0,3);
  lcd.print(" 50 DB");
  
  lcd.setCursor(12,0);
  lcd.print(" 60 DB");
  lcd.setCursor(12,1);
  lcd.print(" 70 DB");
  lcd.setCursor(12,2);
  lcd.print(" 80 DB");
  lcd.setCursor(12,3);
  lcd.print(" 90 DB");  
  }
  
  if(cacah == 4){
  lcd.setCursor(0,0);
  lcd.print(" 20 DB");
  lcd.setCursor(0,1);
  lcd.print(" 30 DB");
  lcd.setCursor(0,2);
  lcd.print(" 40 DB");
  lcd.setCursor(0,3);
  lcd.print(">50 DB");
  
  lcd.setCursor(12,0);
  lcd.print(" 60 DB");
  lcd.setCursor(12,1);
  lcd.print(" 70 DB");
  lcd.setCursor(12,2);
  lcd.print(" 80 DB");
  lcd.setCursor(12,3);
  lcd.print(" 90 DB");  
  }
  
  if(cacah == 5){
  lcd.setCursor(0,0);
  lcd.print(" 20 DB");
  lcd.setCursor(0,1);
  lcd.print(" 30 DB");
  lcd.setCursor(0,2);
  lcd.print(" 40 DB");
  lcd.setCursor(0,3);
  lcd.print(" 50 DB");
  
  lcd.setCursor(12,0);
  lcd.print(">60 DB");
  lcd.setCursor(12,1);
  lcd.print(" 70 DB");
  lcd.setCursor(12,2);
  lcd.print(" 80 DB");
  lcd.setCursor(12,3);
  lcd.print(" 90 DB");  
  }
  
  if(cacah == 6){
  lcd.setCursor(0,0);
  lcd.print(" 20 DB");
  lcd.setCursor(0,1);
  lcd.print(" 30 DB");
  lcd.setCursor(0,2);
  lcd.print(" 40 DB");
  lcd.setCursor(0,3);
  lcd.print(" 50 DB");
  
  lcd.setCursor(12,0);
  lcd.print(" 60 DB");
  lcd.setCursor(12,1);
  lcd.print(">70 DB");
  lcd.setCursor(12,2);
  lcd.print(" 80 DB");
  lcd.setCursor(12,3);
  lcd.print(" 90 DB");  
  }
  
  if(cacah == 7){
  lcd.setCursor(0,0);
  lcd.print(" 20 DB");
  lcd.setCursor(0,1);
  lcd.print(" 30 DB");
  lcd.setCursor(0,2);
  lcd.print(" 40 DB");
  lcd.setCursor(0,3);
  lcd.print(" 50 DB");
  
  lcd.setCursor(12,0);
  lcd.print(" 60 DB");
  lcd.setCursor(12,1);
  lcd.print(" 70 DB");
  lcd.setCursor(12,2);
  lcd.print(">80 DB");
  lcd.setCursor(12,3);
  lcd.print(" 90 DB");  
  }
  
  if(cacah == 8){
  lcd.setCursor(0,0);
  lcd.print(" 20 DB");
  lcd.setCursor(0,1);
  lcd.print(" 30 DB");
  lcd.setCursor(0,2);
  lcd.print(" 40 DB");
  lcd.setCursor(0,3);
  lcd.print(" 50 DB");
  
  lcd.setCursor(12,0);
  lcd.print(" 60 DB");
  lcd.setCursor(12,1);
  lcd.print(" 70 DB");
  lcd.setCursor(12,2);
  lcd.print(" 80 DB");
  lcd.setCursor(12,3);
  lcd.print(">90 DB");  
  }
  
  pwmWrite(pwmpin, 0);  
  delay(20);
}

void mode1(){
  
bt4x = digitalRead(bt4);

int32_t frequency = 100; //frequency (in Hz)
bool success = SetPinFrequencySafe(pwmpin, frequency);

lcd.setCursor(0,0);
lcd.print(" Running..");

pwmWrite(pwmpin, duty);

if(bt4x == 0){
lcd.clear(); 
return;
}

mode1();
}

void mode2(){
  
bt4x = digitalRead(bt4);

int32_t frequency = 200; //frequency (in Hz)
bool success = SetPinFrequencySafe(pwmpin, frequency);

lcd.setCursor(0,1);
lcd.print(" Running..");

pwmWrite(pwmpin, duty);

if(bt4x == 0){
lcd.clear();  
return;
}

mode2();
}

void mode3(){
  
bt4x = digitalRead(bt4);

int32_t frequency = 300; //frequency (in Hz)
bool success = SetPinFrequencySafe(pwmpin, frequency);

lcd.setCursor(0,2);
lcd.print(" Running..");

pwmWrite(pwmpin, duty);

if(bt4x == 0){
lcd.clear();  
return;
}

mode3();
}

void mode4(){
  
bt4x = digitalRead(bt4);

int32_t frequency = 400; //frequency (in Hz)
bool success = SetPinFrequencySafe(pwmpin, frequency);

lcd.setCursor(0,3);
lcd.print(" Running..");

pwmWrite(pwmpin, duty);

if(bt4x == 0){
lcd.clear();  
return;
}

mode4();
}

void mode5(){
  
bt4x = digitalRead(bt4);

int32_t frequency = 500; //frequency (in Hz)
bool success = SetPinFrequencySafe(pwmpin, frequency);

lcd.setCursor(12,0);
lcd.print(" Running..");

pwmWrite(pwmpin, duty);

if(bt4x == 0){
lcd.clear();  
return;
}

mode5();
}

void mode6(){
  
bt4x = digitalRead(bt4);

int32_t frequency = 600; //frequency (in Hz)
bool success = SetPinFrequencySafe(pwmpin, frequency);

lcd.setCursor(12,1);
lcd.print(" Running..");

pwmWrite(pwmpin, duty);

if(bt4x == 0){
lcd.clear();  
return;
}

mode6();
}

void mode7(){
  
bt4x = digitalRead(bt4);

int32_t frequency = 700; //frequency (in Hz)
bool success = SetPinFrequencySafe(pwmpin, frequency);

lcd.setCursor(12,2);
lcd.print(" Running..");

pwmWrite(pwmpin, duty);

if(bt4x == 0){
lcd.clear();  
return;
}

mode7();
}

void mode8(){
  
bt4x = digitalRead(bt4);

int32_t frequency = 800; //frequency (in Hz)
bool success = SetPinFrequencySafe(pwmpin, frequency);

lcd.setCursor(12,3);
lcd.print(" Running..");

pwmWrite(pwmpin, duty);

if(bt4x == 0){
lcd.clear();  
return;
}

mode8();
}



e. VIDEO HASILNYA









Monitor Jarak Secara ONLINE Thingspeak

 Monitor Jarak Secara ONLINE Thingspeak

           Pada kesempatan kali ini saya akan menjelaskan mengenai bagaimana cara membuat sebuah alat yang dapat memonitoring jarak secara online jarak jauh dengan menggunakan webserver Thingspeak. alat ini menggunakan 3 buah sensor HC-SRF04 dan wemos D1 sebagai mikrokontrollernya. untuk lebih jelasnya berikut adalah daftar komponen dan programnya.


a. Wemos D1

 

 

b. LCD I2C



c. Sensor Jarak HC-SRF04



d. Program Arduino IDE

#define  BLYNK_PRINT Serial  
#include <SPI.h>
#include <ESP8266WiFi.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,16,2);

#define trigPin1 D0
#define echoPin1 D3
#define trigPin2 D5
#define echoPin2 D6
#define trigPin3 D7
#define echoPin3 D8

long duration1, distance1;
long duration2, distance2;
long duration3, distance3;

String apiKey = "456FHJVCD9HGTSFGG";     //  Enter your Write API key from ThingSpeak
const char* resource = "/update?api_key=";

const char *ssid =  "Hotspot WIFIKU";     // replace with your wifi ssid and wpa2 key
const char *pass =  "123456789";
const char* server = "api.thingspeak.com";

WiFiClient client;
 
void setup() {

  Serial.begin(115200);
  delay(10);

  Serial.println("Connecting to ");
  Serial.println(ssid);

// Connect to WiFi network
  Serial.println();
  Serial.println();
  Serial.print("Connecting to ");
  Serial.println(ssid);

  WiFi.begin(ssid, pass);

  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  Serial.println("");
  Serial.println("WiFi connected");

      while (WiFi.status() != WL_CONNECTED)
     {
            delay(500);
            Serial.print(".");
     }
      Serial.println("");
      Serial.println("WiFi connected");
 
  lcd.begin();  
  lcd.clear();
  pinMode(trigPin1, OUTPUT);
  pinMode(echoPin1, INPUT);
  pinMode(trigPin2, OUTPUT);
  pinMode(echoPin2, INPUT);
  pinMode(trigPin3, OUTPUT);
  pinMode(echoPin3, INPUT);

  }

 void loop() {

  digitalWrite(trigPin1, LOW);  // Added this line
  delayMicroseconds(2); // Added this line
  digitalWrite(trigPin1, HIGH);
  delayMicroseconds(10); // Added this line
  digitalWrite(trigPin1, LOW);
  duration1 = pulseIn(echoPin1, HIGH);
  distance1 = (duration1/2) / 29.1;

  digitalWrite(trigPin2, LOW);  // Added this line
  delayMicroseconds(2); // Added this line
  digitalWrite(trigPin2, HIGH);
  delayMicroseconds(10); // Added this line
  digitalWrite(trigPin2, LOW);
  duration2 = pulseIn(echoPin2, HIGH);
  distance2 = (duration2/2) / 29.1;

  digitalWrite(trigPin3, LOW);  // Added this line
  delayMicroseconds(2); // Added this line
  digitalWrite(trigPin3, HIGH);
  delayMicroseconds(10); // Added this line
  digitalWrite(trigPin3, LOW);
  duration3 = pulseIn(echoPin3, HIGH);
  distance3 = (duration3/2) / 29.1;

  lcd.setCursor(0,0);
  lcd.print("S1:");
  lcd.print(distance1);
  lcd.print(" S2:");
  lcd.print(distance2);
  lcd.print("   ");
  lcd.setCursor(0,1);
  lcd.print("S3:");
  lcd.print(distance3);
  lcd.print("   ");
 
if (client.connect(server,80))   //   "184.106.153.149" or api.thingspeak.com
  {
                           
    String postStr = apiKey;
           postStr +="&field4=";
           postStr += String(distance1);
           postStr += "\r\n\r\n";

           client.print(String("GET ") + resource + apiKey + "&field4=" + distance1 + "&field5=" + distance2 + "&field6=" + distance3 +" HTTP/1.1\r\n" + "Host: " + server + "\r\n" + "Connection: close\r\n\r\n");
                                       
           client.print("Host: api.thingspeak.com\n");
           client.print("Connection: close\n");
           client.print("X-THINGSPEAKAPIKEY: "+apiKey+"\n");
           client.print("Content-Type: application/x-www-form-urlencoded\n");
           client.print("Content-Length: ");
           client.print(postStr.length());
           client.print("\n\n");
           client.print(postStr);
                           
           Serial.println(". Send to Thingspeak.");
    }
                       
          client.stop();

          Serial.println("Waiting...");
 
  delay(10000);
}
 


e. VIDEO HASILNYA



 

Alat Monitoring Sudut Kemiringan Dataran (Tilt Level) ONLINE BLYNK

Alat Monitoring Sudut Kemiringan Dataran (Tilt Level) ONLINE BLYNK 


           Pada kesempatan kali ini saya akan menjelaskan mengenai bagaimana cara membuat sebuah alat yang dapat digunakan untuk monitoring sudut kemiringan dataran secara online dengan menggunakan blynk sebagai aplikasi untuk pemantauannya. untuk lebih jelasnya berikut adalah daftar komponen dan kodingnya.


a. Nodemcu ESP8266




b. Sensor Potensio Slider




c. Sensor Tilt




d. Sensor Accelero MPU-6050





e. Program Arduino IDE

#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#define BLYNK_PRINT Serial    
#include <SPI.h>
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <SimpleTimer.h>

LiquidCrystal_I2C lcd(0x27, 20, 4);

char auth[] = "hgu6576576gjhvjhgk9898gfalikgh8977hbh";
char ssid[] = "MyHotspot";
char pass[] = "123456789";

const int MPU_addr=0x68;  // I2C address of the MPU-6050
int16_t AcX,AcY,AcZ,Tmp,GyX,GyY,GyZ;

SimpleTimer timer;

int out;
int miring = 16 ;
int bacaSensor;
const int analogInPin = A0;  // Analog input pin that the potentiometer is attached to
int nilai;
int buzzer = D3;
float sudut;

void sendSensor()
{
 Blynk.virtualWrite(V4, sudut);  
 Blynk.virtualWrite(V6, bacaSensor); 
 Blynk.virtualWrite(V5, out); 
 delay(1000);
}

void setup(){

Serial.begin(9600);
lcd.begin();
lcd.clear();
pinMode(miring, INPUT);
pinMode(buzzer, OUTPUT);
Blynk.begin(auth, ssid, pass);
timer.setInterval(100L, sendSensor);

Wire.begin();
Wire.beginTransmission(MPU_addr);
Wire.write(0x6B);  // PWR_MGMT_1 register
Wire.write(0);     // set to zero (wakes up the MPU-6050)
Wire.endTransmission(true);

digitalWrite(buzzer, LOW);
}

void loop(){

  Wire.beginTransmission(MPU_addr);
  Wire.write(0x3B);  // starting with register 0x3B (ACCEL_XOUT_H)
  Wire.endTransmission(false);
  Wire.requestFrom(MPU_addr,14,true);  // request a total of 14 registers
  AcX=Wire.read()<<8|Wire.read();  // 0x3B (ACCEL_XOUT_H) & 0x3C (ACCEL_XOUT_L)   
  AcY=Wire.read()<<8|Wire.read();  // 0x3D (ACCEL_YOUT_H) & 0x3E (ACCEL_YOUT_L)
  Serial.print(AcX); Serial.println('a');
  Serial.print(AcY); Serial.println('b');

sudut = (AcX + 15013)/163.6;

  lcd.setCursor(0,2);
  lcd.print("Sudut : ");
  lcd.print(sudut);
  lcd.print("    ");
     
nilai = analogRead(analogInPin);
out = map(nilai,0,1024,0,100);
  
  lcd.setCursor(0,0);
  lcd.print("slider : ");
  lcd.print(out);
  lcd.print("    ");

bacaSensor = digitalRead(miring);// read TILT sensor
  if(bacaSensor == 1){
    lcd.setCursor(0,1);
    lcd.print("Tilt: ");
    lcd.print(bacaSensor);
    lcd.print(" Miring  ");
    digitalWrite(buzzer, HIGH);
  }
  
  if(bacaSensor == 0){
    lcd.setCursor(0,1);
    lcd.print("Tilt: ");
    lcd.print(bacaSensor);
    lcd.print(" Normal  "); 
    digitalWrite(buzzer, LOW); 
  }
 
 Blynk.run();
 timer.run();
 
 delay(100);
}




f. VIDEO HASILNYA