#include #include // Initialize the LCD using the address 0x27 (you might need to adjust this according to your LCD module) LiquidCrystal_I2C lcd(0x27, 16, 2); // Microwave sensor pin int microwavePin = 2; // You can connect the output pin of the microwave sensor to any digital pin int ledPin = 12; // LED pin bool occupancyDetected = false; void setup() { // Initialize LCD lcd.begin(); // Initialize microwave sensor pin pinMode(microwavePin, INPUT); // Initialize LED pin pinMode(ledPin, OUTPUT); // Print initial message on LCD lcd.clear(); lcd.setCursor(0, 0); lcd.print(" Toilet Status "); } void loop() { // Read the microwave sensor output occupancyDetected = digitalRead(microwavePin); if (occupancyDetected == HIGH) { // Display "OCCUPIED" on LCD when occupancy is detected lcd.setCursor(0, 1); lcd.print(" OCCUPIED "); digitalWrite(ledPin, HIGH); // Turn on the LED } else { // Display "VACANT" on LCD when no occupancy is detected lcd.setCursor(0, 1); lcd.print(" VACANT "); digitalWrite(ledPin, LOW); // Turn off the LED } }