LCD display turns on but doesn’t display text

Hello,

I’m a beginner at coding and decided to make a timer from YouTube. I was able to wire everything to the breadboard and LCD, but the display only turns on and doesn’t display text or boxes. I hooked up a potentiometer and it doesn’t help the contrast on the display. The potentiometer does work as I used it in another project. The blue button is supposed to start the timer and the black button is supposed to stop the timer. I’ll attach the code, written out pin connection from the video and the setup I made. I’m not sure why the display isn’t showing text, so I’d appreciate any suggestions you have.


#include <LiquidCrystal.h>

LiquidCrystal lcd(7, 6, 5, 4, 3, 2);

unsigned long time;            //for whole numbers w/o negatives

void setup()
{
  lcd.begin(16, 2);
  lcd.clear();

  Serial.begin(9600);

  pinMode(8, INPUT);           //set pin to input     
  digitalWrite(8, HIGH);       //turn on pullup resistors
  pinMode(9, INPUT);
  digitalWrite(9, HIGH);
  pinMode(10, INPUT);
  digitalWrite(10, HIGH);

}
double i = 0;                 //double=float - defines numeric variables
double a = millis();
double c ;
void loop()
{
  lcd.clear();
  lcd.print("Ready to Wrestle?");
  lcd.setCursor(0, 1);
  lcd.print("Press to start:)");
  delay(100);

  if (digitalRead(8) == LOW)
  {

    lcd.clear();
    a = millis();
    while (digitalRead(9) == HIGH)
    {

      c = millis();
      i = (c - a) / 1000;
      lcd.print(i);
      lcd.setCursor(8, 0);
      lcd.print("Seconds");
      lcd.setCursor(0, 0);
      Serial.println(c);          //Prints value
      Serial.println(a);
      Serial.println(i);
      Serial.println("...");
      delay(100);
    }

    if (digitalRead(9) == LOW)
    {
      while (digitalRead(8) == HIGH)
      {
        lcd.setCursor(0, 0);
        lcd.print(i);
        lcd.setCursor(8, 0);
        lcd.print("Seconds");
        lcd.setCursor(0, 0);
        delay(100);
      }
    }

  }
}

Before attempting to code timer and button, try to get LCD to display "hello world" by replicating hardware and software at link above . ONce you have that working you can move on. step by step . The soldering on the LCD looks poor (IMO) can you check the joints with a multi-meter.

If you look at the power strips on your breadboard you will see they are spilt in the middle. Unless you want them spilt you have to jumper the 2 sides together.

Please post a schematic, hand drawn and photographed is fine. A list of wires is next to useless.

Thanks

I resoldered it a little better, I attempted to try the Hello World and the text didn’t display, only the boxes which I was able to adjust the contrast with the potentiometer.

Here's the schematic I made online, hope it's good that was my first drawing ever.
Screen Shot 2021-04-23 at 1.47.33 PM

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.