//Project by Dani
//Topic - Industrial safety monitoring
#include <LiquidCrystal.h>

const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

const int motionSensorPin = 6; // Digital pin for motion sensor
const int backlightPin = 7; // Digital pin for LCD backlight control

void setup() {
  
    lcd.begin(16, 2);
      lcd.print("Project by Dani!"); //Designed by Daniel, for more projects :-https://wokwi.com/makers/danibae
        delay(1000);
          lcd.clear();

       
              pinMode(backlightPin, OUTPUT);
                digitalWrite(backlightPin, HIGH); // Turn on the backlight
                }

                void loop() {
                
                    float temperature = readTemperature();
                      bool motionDetected = readMotionSensor();

                
                          lcd.clear();
                            lcd.setCursor(0, 0);
                              lcd.print("Temp: ");
                                lcd.print(temperature);
                                  lcd.print(" C");

                                    lcd.setCursor(0, 1);
                                      lcd.print("Motion: ");
                                        lcd.print(motionDetected ? "Detected" : "None");

                                          delay(1000); 
                                          }

                                          float readTemperature() {
                                          
                                              return 25.0;
                                              }

                                              bool readMotionSensor() {
                                            
                                                  return digitalRead(motionSensorPin) == HIGH;
                                                  }