// Simulation of a dishwasher process using LEDs
// Green LED: Loading and Adding Detergent
// Yellow LED: Washing and Rinsing
// Blue LED: Drying
int loadPin = 2; // Green LED pin
int washPin = 3; // Yellow LED pin
int dryPin = 4; // Blue LED pin
void setup() {
pinMode(loadPin, OUTPUT);
pinMode(washPin, OUTPUT);
pinMode(dryPin, OUTPUT);
// Start the dishwasher process
startDishwasherProcess();
}
void loop() {
// Nothing to do here
}
void startDishwasherProcess() {
// Step 1: Load Dishes and Add Detergent
digitalWrite(loadPin, HIGH);
delay(2000); // Simulate time taken to load dishes and add detergent
digitalWrite(loadPin, LOW);
// Step 2: Washing and Rinsing
digitalWrite(washPin, HIGH);
delay(5000); // Simulate time taken for washing and rinsing
digitalWrite(washPin, LOW);
// Step 3: Drying Dishes
digitalWrite(dryPin, HIGH);
delay(3000); // Simulate time taken for drying dishes
digitalWrite(dryPin, LOW);
}