LCD display

I would like to have help to display the entries on my LCD screens.
I tested the screen vendor code that works well.

here it is

// include the library code:

#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(23, 22, 16, 15, 14, 13);
 
void setup() {
// set up the LCD's number of columns and rows: 
lcd.begin(16, 2);
lcd.setCursor (0, 0);
lcd.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.setCursor(0, 1);
// print the number of seconds since reset:
lcd.print(millis()/1000);
}

on the other hand here is my code that works well but does not appear on the LCD. Help me correct it please.

#include <LiquidCrystal.h>


int finishedPINcracking = 0;//

const int ledPin = 13; 

const int digit1_start = 0; 

const int digit2_start = 0; 

const int digit3_start = 0; 

const int digit4_start = 0;

const int digit1_stop = 9; 

const int digit2_stop = 9; 

const int digit3_stop = 9; 

const int digit4_stop = 9; 

LiquidCrystal lcd(23, 22, 16, 15, 14, 13);

void setup() {

lcd.begin(16, 2);

lcd.print("EFI BRUTEFORCER");
delay(500);
lcd.print("ATTACKING EFI");
delay(500);
lcd.print("CODE ATTEMPT");

pinMode(ledPin, OUTPUT);

delay(6000); } 

void loop() { 

if ( finishedPINcracking == 0 ) { 

for( int digit1 = digit1_start; digit1 <= digit1_stop; digit1++ ) {

delay(2000); 

for( int digit2 = digit2_start; digit2 <= digit2_stop; digit2++ ) {

delay(2000); 

for( int digit3 = digit3_start; digit3 <= digit3_stop; digit3++ ) {

delay(2000);

for( int digit4 = digit4_start; digit4 <= digit4_stop; digit4++ ) { 

if ( (digit4 == 4) || (digit4 == 9) )

{
Keyboard.println(String(digit1) + String(digit2) + String(digit3) + String(digit4));
for ( int timer = 1; timer <= 6; timer++ ) { digitalWrite(ledPin, HIGH);  }

delay(500);

digitalWrite(ledPin, LOW); } 

else{ Keyboard.print(String(digit1)); 

delay(620);

Keyboard.print(String(digit2)); 

delay(860);

Keyboard.print(String(digit3));

delay(590);

Keyboard.print(String(digit4)); 
lcd.setCursor(0, 1);

lcd.print(String(digit1));

lcd.setCursor(1, 1);

lcd.print(String(digit2));

lcd.setCursor(2, 1);

lcd.print(String(digit3));

lcd.setCursor(3, 1);

lcd.print(String(digit4));

delay(740); 

delay(6500);

Keyboard.println(); } } } } } finishedPINcracking = 1; }}

Here's at least part of your problem:

You are dealing with a 16x2 display (32 characters).

The LCD controller is capable of dealing with a large variety of displays, up to 40x2 or 20x4 (80 characters), and it therefore has 80 bytes of memory available even though your particular display only requires 32.

By not repositioning the cursor in setup() you are concatenating the messages that you are sending to the display. Some of them are being placed in (LCD controller) memory locations that do not correspond to the locations on your 16x2 display so you can't see them.

Follow the LCD Addressing link at Don's Collected Technical Information for a more detailed description of this phenomena.

Don