//project by thanga selvi
//Topic - Industrial safety monitoring
#include <LiquidCrystal.h>

// Define the LCD pins
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; 
const int backlightPin = 7; 

void setup() {
    lcd.begin(16, 2);
      lcd.print("Project by TS");
        delay(1000);
          lcd.clear();

              pinMode(backlightPin, OUTPUT);
                digitalWrite(backlightPin, HIGH); 
                }

                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;
                                                  }