annisa solehatul jannah
Published © CC BY

Prototype Papan Penjemuran Ikan Asin

Prototype Papan Penjemuran Ikan Asin Dengan Arduino Uno

EasyProtip3 hours133
Prototype Papan Penjemuran Ikan Asin

Things used in this project

Hardware components

Arduino Nano R3
Arduino Nano R3
×1
Kabel Jumper
×14
Breadboard (generic)
Breadboard (generic)
×1
motor dc
×2
relay
×2
9v battery
×1
Sensor Air
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Prototype papan penjemuran ikan asin

Orkom bb vaaquz3gob q8h1mljxlj

Code

Prototype papan penjemuran ikan asin

Arduino
int motor1 = 7; 
int motor2 = 8; 
int kondisi = 1;
float level_air;
void setup(){

pinMode(motor1, OUTPUT);
pinMode(motor2, OUTPUT);
 digitalWrite(motor1 , HIGH);
 digitalWrite(motor2 , HIGH);
}
 
void loop(){

level_air = analogRead(A0);

if (level_air >= 200 and kondisi == 1){
  digitalWrite(motor2 , LOW);
  delay(300);
  kondisi = 2;
}
if (level_air < 20 and kondisi == 2 ){ // out
  digitalWrite(motor1 , LOW);
  delay(300);
  kondisi = 1;
}
 digitalWrite(motor1 , HIGH);
 digitalWrite(motor2 , HIGH);
}

Credits

annisa solehatul jannah

annisa solehatul jannah

1 project • 0 followers

Comments

Add projectSign up / Login