user52640: #include <LiquidCrystal.h>
LiquidCrystal lcd(1, 2, 4, 5, 6, 7); 
int greenLedPin = 12;
int blueLedPin = 11;
int redLedPin = 8;
int yellowLEdPin = 9;

int lightSensorPin = A0;
int analogValue = 0;

void setup() {
  // put your setup code here, to run once:
  lcd.begin(16, 2); 
  pinMode(greenLedPin, OUTPUT);
  pinMode(blueLedPin, OUTPUT);
  pinMode(redLedPin, OUTPUT);
  pinMode(yellowLEdPin, OUTPUT);
  Serial.begin(9600);
  while (! Serial);

}

void loop() {
  // put your main code here, to run repeatedly:
  Serial.println(analogRead(lightSensorPin));
  analogValue = analogRead(lightSensorPin);
  if (analogValue < 50) {

digitalWrite(redLedPin, HIGH);


  }
  else if (analogValue >= 50 && analogValue <= 99) {
    digitalWrite(yellowLEdPin, HIGH);
  }
  else if (analogValue >= 100 && analogValue <= 300) {

    digitalWrite(blueLedPin, HIGH);
    lcd.print("its bright");
 }
  else {
      digitalWrite(greenLedPin, HIGH);
      lcd.print("its bright");
      }

  delay(3000);
  digitalWrite(greenLedPin, LOW);
  digitalWrite(blueLedPin, LOW);
  digitalWrite(redLedPin, LOW);
  digitalWrite(yellowLEdPin, LOW);
  lcd.clear();

}

I'm very new to this so sorry if its a dumb mistake and I know my LCD is working right, since I have tested it so all the pins are good.

user26916: On the Uno, pin 0 and 1 are used for Serial. You can't use pin 1 for Serial in addition to the LCD. In general, it's best to avoid using pins 0 and 1.
You need to change the LCD wiring to use a different pin and update the code accordingly. For example, if you moved the LCD's RS pin connection from pin 1 on your Arduino to pin 13, you would update this line from:
LiquidCrystal lcd(1, 2, 4, 5, 6, 7);

to:
LiquidCrystal lcd(13, 2, 4, 5, 6, 7);

After that, your LCD should work correctly.

52640: <pre><code>#include &lt;LiquidCrystal.h&gt;
LiquidCrystal lcd(1, 2, 4, 5, 6, 7); 
int greenLedPin = 12;
int blueLedPin = 11;
int redLedPin = 8;
int yellowLEdPin = 9;

int lightSensorPin = A0;
int analogValue = 0;

void setup() {
  // put your setup code here, to run once:
  lcd.begin(16, 2); 
  pinMode(greenLedPin, OUTPUT);
  pinMode(blueLedPin, OUTPUT);
  pinMode(redLedPin, OUTPUT);
  pinMode(yellowLEdPin, OUTPUT);
  Serial.begin(9600);
  while (! Serial);

}

void loop() {
  // put your main code here, to run repeatedly:
  Serial.println(analogRead(lightSensorPin));
  analogValue = analogRead(lightSensorPin);
  if (analogValue &lt; 50) {

digitalWrite(redLedPin, HIGH);


  }
  else if (analogValue &gt;= 50 &amp;&amp; analogValue &lt;= 99) {
    digitalWrite(yellowLEdPin, HIGH);
  }
  else if (analogValue &gt;= 100 &amp;&amp; analogValue &lt;= 300) {

    digitalWrite(blueLedPin, HIGH);
    lcd.print("its bright");
 }
  else {
      digitalWrite(greenLedPin, HIGH);
      lcd.print("its bright");
      }

  delay(3000);
  digitalWrite(greenLedPin, LOW);
  digitalWrite(blueLedPin, LOW);
  digitalWrite(redLedPin, LOW);
  digitalWrite(yellowLEdPin, LOW);
  lcd.clear();

}
</code></pre>

<p>I'm very new to this so sorry if its a dumb mistake and I know my LCD is working right, since I have tested it so all the pins are good.</p>
 26916: <p>On the Uno, <a href="https://www.arduino.cc/reference/en/language/functions/communication/serial/" rel="nofollow noreferrer">pin 0 and 1 are used for Serial</a>. You can't use pin 1 for Serial in addition to the LCD. In general, it's best to avoid using pins 0 and 1.</p>

<p>You need to change the LCD wiring to use a different pin and update the code accordingly. For example, if you moved the LCD's RS pin connection from pin 1 on your Arduino to pin 13, you would update this line from:</p>



<pre class="lang-cpp prettyprint-override"><code>LiquidCrystal lcd(1, 2, 4, 5, 6, 7);
</code></pre>

<p>to:</p>

<pre class="lang-cpp prettyprint-override"><code>LiquidCrystal lcd(13, 2, 4, 5, 6, 7);
</code></pre>

<p>After that, your LCD should work correctly.</p>
