r/ArduinoHelp • • Jun 22 '25

What is the difference between this projects?

Why the first one is working and the second is not working if they are the same?

This is the code:

int seconds = 0;

LiquidCrystal lcd_1(12, 11, 5, 4, 3, 2);

void setup()

{

lcd_1.begin(16, 2); // Set up the number of columns and rows on the LCD.

// Print a message to the LCD.

lcd_1.print("hello world!");

}

void loop()

{

// set the cursor to column 0, line 1

// (note: line 1 is the second row, since counting

// begins with 0):

lcd_1.setCursor(0, 1);

// print the number of seconds since reset:

lcd_1.print(seconds);

delay(1000); // Wait for 1000 millisecond(s)

seconds += 5;

}

2 Upvotes

3 comments sorted by

View all comments

Show parent comment

1

u/NaturalVillage510 Jun 23 '25

Thanks for your help, but i dont understand you. The VCC is connected to 5V, and the GND is connected to the terminal 2 of potentiometer, as in the working circuit.

PD: I am using unconsistent color wires because i am replicating an IRL circuit and I dont have a lot of wires :D Thank you so much for your help

1

u/Sharp-Line334 Jun 23 '25

In the working circuit the Terminal 2 of potentiometer is connected to Gnd, so does the Gnd pin of LCD.
Potentiometer: pin 0 - VCC, 1 - LCD VO, 2 - Gnd
LCD: GND - GND, VCC - VCC, VO - Pot pin 1