user70209: I'm trying to make my LCD screen brighter, can someone can help?
These are the code and the connections:
//LCD
#include <LiquidCrystal.h> 
int Contrast=75;
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);  

//LED
int LdrPin = A0;   // the cell and 10K pulldown are connected to a0
int LdrValue = 0;  // the analog reading from the sensor divider
int LedPin = 10;   // connect Red LED to pin 11 (PWM pin)
int LedBrightness;

//כתום
int LdrPin2 = A0;  // the cell and 10K pulldown are connected to a0
int LdrValue2 = 0; // the analog reading from the sensor divider
int LedPin2 = 9;   // connect Red LED to pin 11 (PWM pin)
int LedBrightness2;

//צהוב
int LdrPin3 = A0;  // the cell and 10K pulldown are connected to a0
int LdrValue3 = 0; // the analog reading from the sensor divider
int LedPin3 = 8;   // connect Red LED to pin 11 (PWM pin)
int LedBrightness3;

//serial monitor
char rx_byte = 0;
//random
long randNumber;

void setup()
{
  //אתחול LCD
  analogWrite(6, Contrast);
  lcd.begin(16, 2);

  //אתחול LED
  pinMode(LdrPin, INPUT);
  pinMode(LedPin, OUTPUT);
  Serial.begin(9600);
       
  pinMode(LdrPin2, INPUT);
  pinMode(LedPin2, OUTPUT);
  Serial.begin(9600);
       
  pinMode(LdrPin3, INPUT);
  pinMode(LedPin3, OUTPUT);
  Serial.begin(9600);
       
  //serial monitor
  Serial.begin(9600);

  //random אתחול
  Serial.begin(9600);
  randomSeed(analogRead(0));
} 

void loop()
{ 
  // lcd.setCursor(2, 0);
  // lcd.print("Good Morning");

  LdrValue = analogRead(LdrPin); 
  //Serial.print("LDR reading = ");
  //Serial.println(LdrValue);    // print the raw analog reading
  LedBrightness = map(LdrValue, 679, 6, 255, 0);

  if (Serial.available() > 0) // is a character available?
  {
    rx_byte = Serial.read();       // get the character
  }        
  //check if morning and show good morning on thr LCD
  if (LdrValue == 679 && rx_byte == '7')
  {
    lcd.setCursor(2, 0);
    lcd.print("Good Morning!");
    //random 50% order of lights
    randNumber = random(0, 2);
    Serial.print(randNumber);
    if (randNumber == 1)
    {
      //אדום
      for (int i=0; i<8; i++)
      {    
        digitalWrite(LedPin, HIGH);
        delay(1000);
        digitalWrite(LedPin, LOW);
        delay(1000);
        //led start working on red
        lcd.setCursor(2, 0);
        lcd.print("working on");
        lcd.setCursor(2, 1);
        lcd.print("red");    
      }    
      //כתום
      for (int i=0; i<4; i++)
      {
        digitalWrite(LedPin2, HIGH);
        delay(1000);
        digitalWrite(LedPin2, LOW);
        delay(1000);     
        //led start working on orange
        lcd.setCursor(2, 0);
        lcd.print("working on");
        lcd.setCursor(2, 1);
        lcd.print("orange");
      } 
  
      //צהוב
      for (int i=0; i<5; i++)
      {
        digitalWrite(LedPin3, HIGH);
        delay(1000);
        digitalWrite(LedPin3, LOW);
        delay(1000);
        //led start working on yellow
        lcd.setCursor(2, 0);
        lcd.print("working on");
        lcd.setCursor(2, 1);
        lcd.print("yellow");
      }
    } else
    {
      //צהוב
      for (int i=0; i<5; i++)
      {
        digitalWrite(LedPin3, HIGH);
        delay(1000);
        digitalWrite(LedPin3, LOW);
        delay(1000);
        //led start working on yellow
        lcd.setCursor(2, 0);
        lcd.print("working on");
        lcd.setCursor(2, 1);
        lcd.print("yellow");
      }

      //כתום
      for (int i=0; i<4; i++)
      {
        digitalWrite(LedPin2, HIGH);
        delay(1000);
        digitalWrite(LedPin2, LOW);
        delay(1000);
        //led start working on orange
        lcd.setCursor(2, 0);
        lcd.print("working on");
        lcd.setCursor(2, 1);
        lcd.print("orange");
      }

      //אדום
      for (int i=0; i<8; i++)
      {
        digitalWrite(LedPin, HIGH);
        delay(1000);
        digitalWrite(LedPin, LOW);
        delay(1000);
        //led start working on red
        lcd.setCursor(2, 0);
        lcd.print("working on");
        lcd.setCursor(2, 1);
        lcd.print("red");
      }
    } 
  } else
  {
    lcd.setCursor(2, 0);
    lcd.print("Good night!");
  }  
}



user61722: For a complete answer, we would need the datasheet of the LCD screen, but in general, LCD screens have a pin for the backlight, or two, one for plus and one for ground.
In the datasheet you can find what voltage the backlight wants, and what the maximum voltage is, and then set it to what you want.
For extra points, you can feed the backlight with PWM and set the brightness from the Arduino; if you do, make sure you don't pull too much current from the Arduino pin; add a FET if necessary.

user63900: Use a 220 ohm resistor for the backlight. Treat it just as an LED. That's what it is, just a normal LED.

70209: <p>I'm trying to make my LCD screen brighter, can someone can help?</p>
<p>These are the code and the connections:</p>
<pre class="lang-cpp prettyprint-override"><code>//LCD
#include &lt;LiquidCrystal.h&gt; 
int Contrast=75;
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);  

//LED
int LdrPin = A0;   // the cell and 10K pulldown are connected to a0
int LdrValue = 0;  // the analog reading from the sensor divider
int LedPin = 10;   // connect Red LED to pin 11 (PWM pin)
int LedBrightness;

//כתום
int LdrPin2 = A0;  // the cell and 10K pulldown are connected to a0
int LdrValue2 = 0; // the analog reading from the sensor divider
int LedPin2 = 9;   // connect Red LED to pin 11 (PWM pin)
int LedBrightness2;

//צהוב
int LdrPin3 = A0;  // the cell and 10K pulldown are connected to a0
int LdrValue3 = 0; // the analog reading from the sensor divider
int LedPin3 = 8;   // connect Red LED to pin 11 (PWM pin)
int LedBrightness3;

//serial monitor
char rx_byte = 0;
//random
long randNumber;

void setup()
{
  //אתחול LCD
  analogWrite(6, Contrast);
  lcd.begin(16, 2);

  //אתחול LED
  pinMode(LdrPin, INPUT);
  pinMode(LedPin, OUTPUT);
  Serial.begin(9600);
       
  pinMode(LdrPin2, INPUT);
  pinMode(LedPin2, OUTPUT);
  Serial.begin(9600);
       
  pinMode(LdrPin3, INPUT);
  pinMode(LedPin3, OUTPUT);
  Serial.begin(9600);
       
  //serial monitor
  Serial.begin(9600);

  //random אתחול
  Serial.begin(9600);
  randomSeed(analogRead(0));
} 

void loop()
{ 
  // lcd.setCursor(2, 0);
  // lcd.print(&quot;Good Morning&quot;);

  LdrValue = analogRead(LdrPin); 
  //Serial.print(&quot;LDR reading = &quot;);
  //Serial.println(LdrValue);    // print the raw analog reading
  LedBrightness = map(LdrValue, 679, 6, 255, 0);

  if (Serial.available() &gt; 0) // is a character available?
  {
    rx_byte = Serial.read();       // get the character
  }        
  //check if morning and show good morning on thr LCD
  if (LdrValue == 679 &amp;&amp; rx_byte == '7')
  {
    lcd.setCursor(2, 0);
    lcd.print(&quot;Good Morning!&quot;);
    //random 50% order of lights
    randNumber = random(0, 2);
    Serial.print(randNumber);
    if (randNumber == 1)
    {
      //אדום
      for (int i=0; i&lt;8; i++)
      {    
        digitalWrite(LedPin, HIGH);
        delay(1000);
        digitalWrite(LedPin, LOW);
        delay(1000);
        //led start working on red
        lcd.setCursor(2, 0);
        lcd.print(&quot;working on&quot;);
        lcd.setCursor(2, 1);
        lcd.print(&quot;red&quot;);    
      }    
      //כתום
      for (int i=0; i&lt;4; i++)
      {
        digitalWrite(LedPin2, HIGH);
        delay(1000);
        digitalWrite(LedPin2, LOW);
        delay(1000);     
        //led start working on orange
        lcd.setCursor(2, 0);
        lcd.print(&quot;working on&quot;);
        lcd.setCursor(2, 1);
        lcd.print(&quot;orange&quot;);
      } 
  
      //צהוב
      for (int i=0; i&lt;5; i++)
      {
        digitalWrite(LedPin3, HIGH);
        delay(1000);
        digitalWrite(LedPin3, LOW);
        delay(1000);
        //led start working on yellow
        lcd.setCursor(2, 0);
        lcd.print(&quot;working on&quot;);
        lcd.setCursor(2, 1);
        lcd.print(&quot;yellow&quot;);
      }
    } else
    {
      //צהוב
      for (int i=0; i&lt;5; i++)
      {
        digitalWrite(LedPin3, HIGH);
        delay(1000);
        digitalWrite(LedPin3, LOW);
        delay(1000);
        //led start working on yellow
        lcd.setCursor(2, 0);
        lcd.print(&quot;working on&quot;);
        lcd.setCursor(2, 1);
        lcd.print(&quot;yellow&quot;);
      }

      //כתום
      for (int i=0; i&lt;4; i++)
      {
        digitalWrite(LedPin2, HIGH);
        delay(1000);
        digitalWrite(LedPin2, LOW);
        delay(1000);
        //led start working on orange
        lcd.setCursor(2, 0);
        lcd.print(&quot;working on&quot;);
        lcd.setCursor(2, 1);
        lcd.print(&quot;orange&quot;);
      }

      //אדום
      for (int i=0; i&lt;8; i++)
      {
        digitalWrite(LedPin, HIGH);
        delay(1000);
        digitalWrite(LedPin, LOW);
        delay(1000);
        //led start working on red
        lcd.setCursor(2, 0);
        lcd.print(&quot;working on&quot;);
        lcd.setCursor(2, 1);
        lcd.print(&quot;red&quot;);
      }
    } 
  } else
  {
    lcd.setCursor(2, 0);
    lcd.print(&quot;Good night!&quot;);
  }  
}
</code></pre>
<p><a href="https://i.stack.imgur.com/8NbnG.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8NbnG.jpg" alt="enter image description here" /></a></p>
 61722: <p>For a complete answer, we would need the datasheet of the LCD screen, but in general, LCD screens have a pin for the backlight, or two, one for plus and one for ground.</p>
<p>In the datasheet you can find what voltage the backlight wants, and what the maximum voltage is, and then set it to what you want.</p>
<p>For extra points, you can feed the backlight with PWM and set the brightness from the Arduino; if you do, make sure you don't pull too much current from the Arduino pin; add a FET if necessary.</p>
 63900: <p>Use a 220 ohm resistor for the backlight. Treat it just as an LED. That's what it is, just a normal LED.</p>
