hello fellow IT professional/Engineering, I'm a new in Arduino I need Help I want to insert timer or equivalent time for 20 php
for example:
20php is 5mins
what code i use
and where to insert the code
thank you
void loop() {
if (noCoin == false) {
noCoin = true;
lcd.setCursor(0, 0);
lcd.print(" Dayawon");
lcd.setCursor(0,1);
lcd.print(" Vendo Machine");
}
buttonState = digitalRead(button);
if (buttonState == 1 && pulse > 0 && userBalance) {
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Start Disinfect");
for (int i = pulse; i > 0; i--) {
lcd.setCursor(0, 1);
lcd.print(" ");
lcd.setCursor(0, 1);
lcd.print(i);
tone(buzzer,523);
delay(500);
noTone(buzzer);
delay(500);
}
pulse = 0;
noCoin = false;
lcd.clear();
lcd.setCursor(0, 0);
lcd.print(" Thank You Bye!");
delay(1700);
lcd.clear();
tone(buzzer, 3000);
delay(200);
noTone(buzzer);
delay(50);
tone(buzzer, 3000);
delay(50);
noTone(buzzer);
}
coinSlotStatus = digitalRead(coinSlot);
delay(30);
if (coinSlotStatus == 0) {
userBalance = true;
lcd.setCursor(0, 0);
lcd.print("Press a Button");
pulse += 1;
lcd.setCursor(0, 1);
sprintf(lcdBuffer, "Bal. Php %d.00", pulse);
lcd.setCursor(0, 1);
lcd.print(lcdBuffer);
delay(30);
}
noTone(buzzer);
}
this is my project or my thesis its like a vendo machine
thanks