change state of buzzer

This commit is contained in:
Muhammad Izza Alfiansyah 2024-05-27 09:46:13 +07:00
parent e348f32fd0
commit 2eff8175e2
2 changed files with 6 additions and 6 deletions

View File

@ -53,7 +53,7 @@ void setup(){
digitalWrite(LAMPPIN, HIGH);
digitalWrite(FANPIN, HIGH);
digitalWrite(BUZZERPIN, HIGH);
digitalWrite(BUZZERPIN, LOW);
Serial.begin(115200);
@ -183,7 +183,7 @@ void runFermentasi() {
bool statusHistoriTerakhir = dataHistori[0]["selesai"];
if (statusHistoriTerakhir == false) {
digitalWrite(BUZZERPIN, LOW);
digitalWrite(BUZZERPIN, HIGH);
bool historiTerakhirBerhasil = (bool) dataHistori[0]["berhasil"];
@ -193,7 +193,7 @@ void runFermentasi() {
status = "Gagal";
}
} else {
digitalWrite(BUZZERPIN, HIGH);
digitalWrite(BUZZERPIN, LOW);
cekKematangan();
insertKondisiTapai();
}

View File

@ -44,7 +44,7 @@ void setup(){
digitalWrite(LAMPPIN, HIGH);
digitalWrite(FANPIN, HIGH);
digitalWrite(BUZZERPIN, HIGH);
digitalWrite(BUZZERPIN, LOW);
Serial.begin(115200);
@ -176,7 +176,7 @@ void runFermentasi() {
// bool statusHistoriTerakhir = dataHistori[0]["selesai"];
// if (statusHistoriTerakhir == false) {
// digitalWrite(BUZZERPIN, LOW);
// digitalWrite(BUZZERPIN, HIGH);
// bool historiTerakhirBerhasil = (bool) dataHistori[0]["berhasil"];
@ -186,7 +186,7 @@ void runFermentasi() {
// status = "Gagal";
// }
// } else {
// digitalWrite(BUZZERPIN, HIGH);
// digitalWrite(BUZZERPIN, LOW);
// cekKematangan();
// cekKegagalan();
// insertKondisiTapai();