Arduino Smart Home
Pada kesempatan kali ini saya akan menjelaskan mengenai bagaimana cara membuat sebuah alat yang digunakan untuk mengendalikan beberapa device di peralatan rumah seperti halnya pintu / door lock, kipas, lampu dan lain-lain. alat ini menggunakan beberapa sensor untuk memonitoring kondisi didalam rumah seperti kondisi gas, api, dan yang lainya. untuk lebih jelasnya berikut adalah komponen dan programnya.
a. Komponen
b. Program Arduino IDE
#include <Wire.h>
#include <SPI.h>
#include <Keypad.h>
#include <Adafruit_PN532.h>
#include "DHT.h" //library dht11
#include <LiquidCrystal_I2C.h> //i2C LCD Library
#include <DS3231.h>
#include <SoftwareSerial.h>
#include <DFPlayer_Mini_Mp3.h>
LiquidCrystal_I2C lcd(0x27, 16, 2); //library i2c lcd 16x2
LiquidCrystal_I2C lcd2(0x3E, 20, 4); //library i2c lcd 16x2
SoftwareSerial mySerial(10,11); // RX, TX
#define DHTPIN 28 // pin digital untuk dht11
#define DHTTYPE DHT11 // set dht11
#define trigPin 37
#define echoPin 35
DHT dht(DHTPIN, DHTTYPE); //set dht11
// If using the breakout with SPI, define the pins for SPI communication.
#define PN532_SCK (2)
#define PN532_MOSI (3)
#define PN532_SS (4)
#define PN532_MISO (5)
#define IRQ (2)
#define RESET (3)
Adafruit_PN532 nfc(PN532_SCK, PN532_MISO, PN532_MOSI, PN532_SS);
//Adafruit_NFCShield_I2C nfc(IRQ, RESET);
int sw1 = A3;
int sw2 = A5;
int sw3 = A7;
int sw1x;
int sw2x;
int sw3x;
float h;
float t;
long duration, distance;
int mq6,mq3;
int suara;
int api;
int hujan;
int pir;
int ledm = 23;
int ledk = 25;
int ledh = 27;
long first;
int relaykipas1 = 31;
int relaykipas2 = 29;
int buzzer = 16;
char customKey;
const byte ROWS = 4;
const byte COLS = 4;
DS3231 rtc(SDA, SCL);
char keys[ROWS][COLS] = {
{'/', 'C', '-', '+'},
{'=', '9', '6', '3'},
{'0', '8', '5', '2'},
{'*', '7', '4', '1'}
};
byte rowPins[ROWS] = {32,A14,A12,A10}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {A8,A6,A4,A2}; //connect to the column pinouts of the keypad
//initialize an instance of class NewKeypad
Keypad customKeypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS);
void setup() {
pinMode(sw1,INPUT_PULLUP);
pinMode(sw2,INPUT_PULLUP);
pinMode(sw3,INPUT_PULLUP);
Serial.begin(9600);
//Serial.println("Hello!");
nfc.begin();
uint32_t versiondata = nfc.getFirmwareVersion();
if (! versiondata) {
//Serial.print("Didn't find PN53x board");
while (1); // halt
}
// Got ok data, print it out!
//Serial.print("Found chip PN5"); Serial.println((versiondata>>24) & 0xFF, HEX);
//Serial.print("Firmware ver. "); Serial.print((versiondata>>16) & 0xFF, DEC);
//Serial.print('.'); Serial.println((versiondata>>8) & 0xFF, DEC);
// configure board to read RFID tags
nfc.SAMConfig();
//Serial.println("Waiting for an ISO14443A Card ...");
//Serial.begin(9600);
lcd.begin(); //set lcd i2c
lcd.noCursor(); //biar gak ada cursor di lcd
lcd.clear(); //clear lcd
lcd2.begin(); //set lcd i2c
lcd2.noCursor(); //biar gak ada cursor di lcd
lcd2.clear(); //clear lcd
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
pinMode(suara, INPUT);
pinMode(api, INPUT);
pinMode(hujan, INPUT);
pinMode(pir, INPUT);
pinMode(ledm, OUTPUT);
pinMode(ledk, OUTPUT);
pinMode(ledh, OUTPUT);
digitalWrite(ledm,LOW);
digitalWrite(ledk,HIGH);
digitalWrite(ledh,LOW);
pinMode(buzzer, OUTPUT);
digitalWrite(buzzer,LOW);
pinMode(relaykipas1, OUTPUT);
pinMode(relaykipas2, OUTPUT);
digitalWrite(relaykipas1,HIGH);
digitalWrite(relaykipas2,HIGH);
rtc.begin();
// The following lines can be uncommented to set the date and time
//rtc.setDOW(WEDNESDAY); // Set Day-of-Week to SUNDAY
//rtc.setTime(10, 22, 0); // Set the time to 12:00:00 (24hr format)
//rtc.setDate(12, 14, 2022); // Set the date to January 1st, 2014
mySerial.begin(9600);
mp3_set_serial(mySerial); //set softwareSerial for DFPlayer-mini mp3 module
delay(1); //wait 1ms for mp3 module to set volume
mp3_set_volume(30); //volume 0-30
inputkartu();
inputpasswd();
}
void loop() {
customKey = customKeypad.getKey();
switch(customKey)
{
case 'B':
inputpasswd();
break;
}
suara = digitalRead(18);
api = digitalRead(26);
hujan = digitalRead(24);
pir = digitalRead(30);
mq6 = analogRead(A0);
mq3 = analogRead(A1);
h = dht.readHumidity(); //ambil data humidity
t = dht.readTemperature(); //ambil data suhu c
digitalWrite(trigPin, LOW); // Added this line
delayMicroseconds(2); // Added this line
digitalWrite(trigPin, HIGH);
delayMicroseconds(10); // Added this line
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distance = (duration/2) / 29.1;
sw1x = digitalRead(sw1);
sw2x = digitalRead(sw2);
sw3x = digitalRead(sw3);
lcd.setCursor(0,0);
lcd.print("LOGIN");
lcd2.setCursor(0,0);
lcd2.print("T/H:");
lcd2.print(t,0);lcd2.print("/");lcd2.print(h,0);lcd2.print(" ");
lcd2.print("S:");
lcd2.print(distance);lcd2.print(" ");
lcd2.setCursor(0,1);
lcd2.print("Q6:");lcd2.print(mq6);lcd2.print(" ");
lcd2.print("Q3:");lcd2.print(mq3);lcd2.print(" ");
lcd2.setCursor(0,2);
lcd2.print("S/A/H/P:");lcd2.print(suara);lcd2.print("/");lcd2.print(api);lcd2.print("/");lcd2.print(hujan);lcd2.print("/");lcd2.print(pir);
lcd2.setCursor(0,3);
lcd2.print(rtc.getTimeStr());
lcd2.print(" ");
lcd2.print(sw1x);
lcd2.print(sw2x);
lcd2.print(sw3x);
Serial.print("*");
Serial.print(t);
Serial.print(",");
Serial.print(h);
Serial.print(",");
Serial.print(distance);
Serial.print(",");
Serial.print(mq6);
Serial.print(",");
Serial.print(mq3);
Serial.print(",");
Serial.print(suara);
Serial.print(",");
Serial.print(api);
Serial.print(",");
Serial.print(hujan);
Serial.print(",");
Serial.print(pir);
Serial.println("#");
delay(1000);
}
void inputpasswd(){
lcd.setCursor(0,0);
lcd.print("INPUT PASSWD");
customKey = customKeypad.getKey();
switch(customKey)
{
case '0' ... '9': // This keeps collecting the first value until a operator is pressed "+-*/"
lcd.setCursor(0,1);
first = first * 10 + (customKey - '0');
lcd.print(first);
break;
case 'C':
if(first == 1234){
lcd.clear();
lcd.setCursor(0,1);
lcd.print("BENAR");
mp3_play(1); //play music file 0001.mp3
delay(10000);
mp3_stop();
digitalWrite(relaykipas1,LOW);
digitalWrite(relaykipas2,LOW);
lcd.clear();
return;
}
first = 0;
lcd.clear();
break;
}
inputpasswd();
}
void inputkartu(void){
lcd.setCursor(0,0);
lcd.print("DEKATKAN KARTU");
uint8_t success;
uint8_t uid[] = { 0, 0, 0, 0, 0, 0, 0 }; // Buffer to store the returned UID
uint8_t uidLength; // Length of the UID (4 or 7 bytes depending on ISO14443A card type)
// Wait for an ISO14443A type cards (Mifare, etc.). When one is found
// 'uid' will be populated with the UID, and uidLength will indicate
// if the uid is 4 bytes (Mifare Classic) or 7 bytes (Mifare Ultralight)
success = nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A, uid, &uidLength);
if (success) {
lcd.clear();
// Display some basic information about the card
//Serial.println("Found an ISO14443A card");
//Serial.print(" UID Length: ");Serial.print(uidLength, DEC);Serial.println(" bytes");
//Serial.print(" UID Value: ");
//nfc.PrintHex(uid, uidLength);
if (uidLength == 4)
{
// We probably have a Mifare Classic card ...
uint32_t cardid = uid[0];
cardid <<= 8;
cardid |= uid[1];
cardid <<= 8;
cardid |= uid[2];
cardid <<= 8;
cardid |= uid[3];
//Serial.print("Seems to be a Mifare Classic card #");
//Serial.println(cardid); //3495259931
lcd.setCursor(0,0);
lcd.print(cardid);
delay(2000);
if(cardid == 3495259931){
lcd.clear();
lcd.setCursor(0,1);
lcd.print("BENAR");
digitalWrite(ledm,LOW);
digitalWrite(ledk,LOW);
digitalWrite(ledh,HIGH);
digitalWrite(buzzer,HIGH);
delay(100);
digitalWrite(buzzer,LOW);
delay(100);
digitalWrite(buzzer,HIGH);
delay(100);
digitalWrite(buzzer,LOW);
delay(2000);
lcd.clear();
return;
}
else{
digitalWrite(ledm,HIGH);
digitalWrite(ledk,LOW);
digitalWrite(ledh,LOW);
digitalWrite(buzzer,HIGH);
delay(100);
digitalWrite(buzzer,LOW);
delay(100);
digitalWrite(buzzer,HIGH);
delay(100);
digitalWrite(buzzer,LOW);
delay(100);
digitalWrite(buzzer,HIGH);
delay(100);
digitalWrite(buzzer,LOW);
digitalWrite(ledm,LOW);
digitalWrite(ledk,HIGH);
digitalWrite(ledh,LOW);
delay(2000);
}
//Serial.println("");
}
}
inputkartu();
}
#include <SPI.h>
#include <Keypad.h>
#include <Adafruit_PN532.h>
#include "DHT.h" //library dht11
#include <LiquidCrystal_I2C.h> //i2C LCD Library
#include <DS3231.h>
#include <SoftwareSerial.h>
#include <DFPlayer_Mini_Mp3.h>
LiquidCrystal_I2C lcd(0x27, 16, 2); //library i2c lcd 16x2
LiquidCrystal_I2C lcd2(0x3E, 20, 4); //library i2c lcd 16x2
SoftwareSerial mySerial(10,11); // RX, TX
#define DHTPIN 28 // pin digital untuk dht11
#define DHTTYPE DHT11 // set dht11
#define trigPin 37
#define echoPin 35
DHT dht(DHTPIN, DHTTYPE); //set dht11
// If using the breakout with SPI, define the pins for SPI communication.
#define PN532_SCK (2)
#define PN532_MOSI (3)
#define PN532_SS (4)
#define PN532_MISO (5)
#define IRQ (2)
#define RESET (3)
Adafruit_PN532 nfc(PN532_SCK, PN532_MISO, PN532_MOSI, PN532_SS);
//Adafruit_NFCShield_I2C nfc(IRQ, RESET);
int sw1 = A3;
int sw2 = A5;
int sw3 = A7;
int sw1x;
int sw2x;
int sw3x;
float h;
float t;
long duration, distance;
int mq6,mq3;
int suara;
int api;
int hujan;
int pir;
int ledm = 23;
int ledk = 25;
int ledh = 27;
long first;
int relaykipas1 = 31;
int relaykipas2 = 29;
int buzzer = 16;
char customKey;
const byte ROWS = 4;
const byte COLS = 4;
DS3231 rtc(SDA, SCL);
char keys[ROWS][COLS] = {
{'/', 'C', '-', '+'},
{'=', '9', '6', '3'},
{'0', '8', '5', '2'},
{'*', '7', '4', '1'}
};
byte rowPins[ROWS] = {32,A14,A12,A10}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {A8,A6,A4,A2}; //connect to the column pinouts of the keypad
//initialize an instance of class NewKeypad
Keypad customKeypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS);
void setup() {
pinMode(sw1,INPUT_PULLUP);
pinMode(sw2,INPUT_PULLUP);
pinMode(sw3,INPUT_PULLUP);
Serial.begin(9600);
//Serial.println("Hello!");
nfc.begin();
uint32_t versiondata = nfc.getFirmwareVersion();
if (! versiondata) {
//Serial.print("Didn't find PN53x board");
while (1); // halt
}
// Got ok data, print it out!
//Serial.print("Found chip PN5"); Serial.println((versiondata>>24) & 0xFF, HEX);
//Serial.print("Firmware ver. "); Serial.print((versiondata>>16) & 0xFF, DEC);
//Serial.print('.'); Serial.println((versiondata>>8) & 0xFF, DEC);
// configure board to read RFID tags
nfc.SAMConfig();
//Serial.println("Waiting for an ISO14443A Card ...");
//Serial.begin(9600);
lcd.begin(); //set lcd i2c
lcd.noCursor(); //biar gak ada cursor di lcd
lcd.clear(); //clear lcd
lcd2.begin(); //set lcd i2c
lcd2.noCursor(); //biar gak ada cursor di lcd
lcd2.clear(); //clear lcd
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
pinMode(suara, INPUT);
pinMode(api, INPUT);
pinMode(hujan, INPUT);
pinMode(pir, INPUT);
pinMode(ledm, OUTPUT);
pinMode(ledk, OUTPUT);
pinMode(ledh, OUTPUT);
digitalWrite(ledm,LOW);
digitalWrite(ledk,HIGH);
digitalWrite(ledh,LOW);
pinMode(buzzer, OUTPUT);
digitalWrite(buzzer,LOW);
pinMode(relaykipas1, OUTPUT);
pinMode(relaykipas2, OUTPUT);
digitalWrite(relaykipas1,HIGH);
digitalWrite(relaykipas2,HIGH);
rtc.begin();
// The following lines can be uncommented to set the date and time
//rtc.setDOW(WEDNESDAY); // Set Day-of-Week to SUNDAY
//rtc.setTime(10, 22, 0); // Set the time to 12:00:00 (24hr format)
//rtc.setDate(12, 14, 2022); // Set the date to January 1st, 2014
mySerial.begin(9600);
mp3_set_serial(mySerial); //set softwareSerial for DFPlayer-mini mp3 module
delay(1); //wait 1ms for mp3 module to set volume
mp3_set_volume(30); //volume 0-30
inputkartu();
inputpasswd();
}
void loop() {
customKey = customKeypad.getKey();
switch(customKey)
{
case 'B':
inputpasswd();
break;
}
suara = digitalRead(18);
api = digitalRead(26);
hujan = digitalRead(24);
pir = digitalRead(30);
mq6 = analogRead(A0);
mq3 = analogRead(A1);
h = dht.readHumidity(); //ambil data humidity
t = dht.readTemperature(); //ambil data suhu c
digitalWrite(trigPin, LOW); // Added this line
delayMicroseconds(2); // Added this line
digitalWrite(trigPin, HIGH);
delayMicroseconds(10); // Added this line
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distance = (duration/2) / 29.1;
sw1x = digitalRead(sw1);
sw2x = digitalRead(sw2);
sw3x = digitalRead(sw3);
lcd.setCursor(0,0);
lcd.print("LOGIN");
lcd2.setCursor(0,0);
lcd2.print("T/H:");
lcd2.print(t,0);lcd2.print("/");lcd2.print(h,0);lcd2.print(" ");
lcd2.print("S:");
lcd2.print(distance);lcd2.print(" ");
lcd2.setCursor(0,1);
lcd2.print("Q6:");lcd2.print(mq6);lcd2.print(" ");
lcd2.print("Q3:");lcd2.print(mq3);lcd2.print(" ");
lcd2.setCursor(0,2);
lcd2.print("S/A/H/P:");lcd2.print(suara);lcd2.print("/");lcd2.print(api);lcd2.print("/");lcd2.print(hujan);lcd2.print("/");lcd2.print(pir);
lcd2.setCursor(0,3);
lcd2.print(rtc.getTimeStr());
lcd2.print(" ");
lcd2.print(sw1x);
lcd2.print(sw2x);
lcd2.print(sw3x);
Serial.print("*");
Serial.print(t);
Serial.print(",");
Serial.print(h);
Serial.print(",");
Serial.print(distance);
Serial.print(",");
Serial.print(mq6);
Serial.print(",");
Serial.print(mq3);
Serial.print(",");
Serial.print(suara);
Serial.print(",");
Serial.print(api);
Serial.print(",");
Serial.print(hujan);
Serial.print(",");
Serial.print(pir);
Serial.println("#");
delay(1000);
}
void inputpasswd(){
lcd.setCursor(0,0);
lcd.print("INPUT PASSWD");
customKey = customKeypad.getKey();
switch(customKey)
{
case '0' ... '9': // This keeps collecting the first value until a operator is pressed "+-*/"
lcd.setCursor(0,1);
first = first * 10 + (customKey - '0');
lcd.print(first);
break;
case 'C':
if(first == 1234){
lcd.clear();
lcd.setCursor(0,1);
lcd.print("BENAR");
mp3_play(1); //play music file 0001.mp3
delay(10000);
mp3_stop();
digitalWrite(relaykipas1,LOW);
digitalWrite(relaykipas2,LOW);
lcd.clear();
return;
}
first = 0;
lcd.clear();
break;
}
inputpasswd();
}
void inputkartu(void){
lcd.setCursor(0,0);
lcd.print("DEKATKAN KARTU");
uint8_t success;
uint8_t uid[] = { 0, 0, 0, 0, 0, 0, 0 }; // Buffer to store the returned UID
uint8_t uidLength; // Length of the UID (4 or 7 bytes depending on ISO14443A card type)
// Wait for an ISO14443A type cards (Mifare, etc.). When one is found
// 'uid' will be populated with the UID, and uidLength will indicate
// if the uid is 4 bytes (Mifare Classic) or 7 bytes (Mifare Ultralight)
success = nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A, uid, &uidLength);
if (success) {
lcd.clear();
// Display some basic information about the card
//Serial.println("Found an ISO14443A card");
//Serial.print(" UID Length: ");Serial.print(uidLength, DEC);Serial.println(" bytes");
//Serial.print(" UID Value: ");
//nfc.PrintHex(uid, uidLength);
if (uidLength == 4)
{
// We probably have a Mifare Classic card ...
uint32_t cardid = uid[0];
cardid <<= 8;
cardid |= uid[1];
cardid <<= 8;
cardid |= uid[2];
cardid <<= 8;
cardid |= uid[3];
//Serial.print("Seems to be a Mifare Classic card #");
//Serial.println(cardid); //3495259931
lcd.setCursor(0,0);
lcd.print(cardid);
delay(2000);
if(cardid == 3495259931){
lcd.clear();
lcd.setCursor(0,1);
lcd.print("BENAR");
digitalWrite(ledm,LOW);
digitalWrite(ledk,LOW);
digitalWrite(ledh,HIGH);
digitalWrite(buzzer,HIGH);
delay(100);
digitalWrite(buzzer,LOW);
delay(100);
digitalWrite(buzzer,HIGH);
delay(100);
digitalWrite(buzzer,LOW);
delay(2000);
lcd.clear();
return;
}
else{
digitalWrite(ledm,HIGH);
digitalWrite(ledk,LOW);
digitalWrite(ledh,LOW);
digitalWrite(buzzer,HIGH);
delay(100);
digitalWrite(buzzer,LOW);
delay(100);
digitalWrite(buzzer,HIGH);
delay(100);
digitalWrite(buzzer,LOW);
delay(100);
digitalWrite(buzzer,HIGH);
delay(100);
digitalWrite(buzzer,LOW);
digitalWrite(ledm,LOW);
digitalWrite(ledk,HIGH);
digitalWrite(ledh,LOW);
delay(2000);
}
//Serial.println("");
}
}
inputkartu();
}
c. Program NodeMCU ESP8266
#define BLYNK_PRINT Serial
#include <SPI.h>
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <SimpleTimer.h>
int temp;
int x = 5;
int y;
int value1;
int value2;
int t = 0;
int h = 0;
int distance = 0;
int mq6 = 0;
int mq3 = 0;
int suara = 0;
int api = 0;
int hujan = 0;
int pir = 0;
float datain1;
float datain2;
float datain3;
float datain4;
float datain5;
float datain6;
float datain7;
float datain8;
float datain9;
String dataIn;
String dt[10];
int i;
boolean parsing=false;
char auth[] = "jkjbgjhgauyfgc6756fghbjhbjhcvghaoih78";
char ssid[] = "wifihpku";
char pass[] = "123456789";
SimpleTimer timer;
void sendSensor()
{
Blynk.virtualWrite(V1, t);
Blynk.virtualWrite(V2, h);
Blynk.virtualWrite(V3, distance);
Blynk.virtualWrite(V4, mq6);
Blynk.virtualWrite(V5, mq3);
Blynk.virtualWrite(V6, suara);
Blynk.virtualWrite(V7, api);
Blynk.virtualWrite(V8, hujan);
Blynk.virtualWrite(V9, pir);
delay(1000);
}
void setup()
{
Serial.begin(9600);
Blynk.begin(auth, ssid, pass);
timer.setInterval(1000L, sendSensor);
}
void loop()
{
while(Serial.available()>0) {
// dataIn="";
char inChar = (char)Serial.read();
dataIn += inChar;
if (inChar == '\n') {
parsing = true;
}
}
if(parsing){
parsingData();
Blynk.run();
timer.run();
}
}
void parsingData(){
int j=0;
//kirim data yang telah diterima sebelumnya
//Serial.print("data masuk : ");
//Serial.print(dataIn);
//Serial.print("\n");
//inisialisasi variabel, (reset isi variabel)
dt[j]="";
//proses parsing data
for(i=1;i<dataIn.length();i++){
//pengecekan tiap karakter dengan karakter (#) dan (,)
if ((dataIn[i] == '#') || (dataIn[i] == ','))
{
//increment variabel j, digunakan untuk merubah index array penampung
j++;
dt[j]=""; //inisialisasi variabel array dt[j]
}
else
{
//proses tampung data saat pengecekan karakter selesai.
dt[j] = dt[j] + dataIn[i];
}
}
datain1 = dt[0].toInt();
datain2 = dt[1].toInt();
datain3 = dt[2].toInt();
datain4 = dt[3].toInt();
datain5 = dt[4].toInt();
datain6 = dt[5].toInt();
datain7 = dt[6].toInt();
datain8 = dt[7].toInt();
datain9 = dt[8].toInt();
//kirim data hasil parsing
Serial.print("data 1 : ");
Serial.print(datain1);
Serial.print("\n");
Serial.print("data 2 : ");
Serial.print(datain2);
Serial.print("\n");
Serial.print("data 3 : ");
Serial.print(datain3);
Serial.print("\n");
Serial.print("data 4 : ");
Serial.print(datain4);
Serial.print("\n");
Serial.print("data 5 : ");
Serial.print(datain5);
Serial.print("\n");
Serial.print("data 6 : ");
Serial.print(datain6);
Serial.print("\n");
Serial.print("data 7 : ");
Serial.print(datain7);
Serial.print("\n");
Serial.print("data 8 : ");
Serial.print(datain8);
Serial.print("\n");
Serial.print("data 9 : ");
Serial.print(datain9);
Serial.print("\n");
//Serial.print("data 3 : ");
//Serial.print(dt[2].toInt());
//Serial.print("\n\n");
t = datain1 / 1;
h = datain2 / 1;
distance = datain3 / 1;
mq6 = datain4 / 1;
mq3 = datain5 / 1;
suara = datain6 / 1;
api = datain7 / 1;
hujan = datain8 / 1;
pir = datain9 / 1;
}
d. VIDEO HASILNYA
No comments:
Post a Comment