DC Voltmeter need help

Trying to convert the code for a different screen and having no luck at all as Im new to this and could really use some help . designing circuits is what i do but not coding

here is the code that I’m trying to conert for the screen I need

from a Liquid crystal to this U8G2_ST7920_128X64_ any help would be great

====================================================

#include <LiquidCrystal.h>
LiquidCrystal lcd(2,3,4,5,6,7);
 
int ADC_a = 0;              //Analog Input
float VIn_a = 0.0;          //Voltage In after voltage divider
float Voltage_a = 0.0;       //Actual voltage after calculation
float CalVal = 11.1111;           //Voltage divider calibration value

//Timing
unsigned long previousMillis = 0;
const long interval = 200;          //Interval to read voltages

void setup() {
  // put your setup code here, to run once:

  Serial.begin(9600);
  
  lcd.begin(16,2);
  lcd.clear();
  lcd.setCursor(0,0);
  lcd.print("Volt Meter");

  pinMode(A0,INPUT);
  pinMode(A1,INPUT);
  
}

void loop() {

   unsigned long currentMillis = millis();
   
   //Timing Loop
    if (currentMillis - previousMillis >= interval) {
    previousMillis = currentMillis;

    ADC_a = analogRead(A0);              //Read analog values
    VIn_a = (ADC_a * 5.0) / 1024.0;     //Convert 10bit input to an actual voltage
    
    Voltage_a = (VIn_a * CalVal);
  //  float v_rounded = ((int) (Voltage_a * 10.0 + 0.5) / 10.0);
    float v_rounded = round(Voltage_a*10)/10;
    
    lcd.setCursor(0,1);
    lcd.print(Voltage_a,1);
    lcd.setCursor(8,1);
    lcd.print(v_rounded);

  } //Timing

} //Loop

=========================================================

Do you have any of the library example code working with your display?
“Hello world!” or a smiley face icon?

Please remember to use code tags when posting code

here is the code that displays on the screen but I cannot get it to do anything and wont read from pin AO or A1 I removed the old code and replaced it with the one I'm trying to get working. Thank You Matthew

Do you have any of the library example code working with your display?
“Hello world!” or a smiley face icon?

Here is the example that will work with my screen

#include <Arduino.h>
#include <U8g2lib.h>
#include <SPI.h>
#include <Wire.h>

U8G2_ST7920_128X64_1_SW_SPI u8g2(U8G2_R0, 13, 11, 10, 8);

void setup(void) {
  u8g2.begin();
}

void loop(void) {
  u8g2.firstPage();
  do {
    u8g2.setFont(u8g2_font_ncenB14_tr);
    u8g2.drawStr(0,24,"Hello World!");
  } while ( u8g2.nextPage() );
}

Replace the loop function with this one

void loop(void) 
{
  u8g2.firstPage();
  char buffer [10];
  sprintf (buffer, "%d", analogRead (A0));
  do {
    u8g2.setFont(u8g2_font_ncenB14_tr);
    u8g2.drawStr(0,24, buffer);
  } while ( u8g2.nextPage() );
}

Please remember to use code tags when posting code, and don’t replace code in earlier posts with unrelated code.

Thank You for all your help you have been great