Reading 12 volt battery using an esp32

Hello everyone please can you take a look at this coding which is reading two 12 volt car batteries as the end readings showing on the serial monitor are not as accurate as the voltage reading i am getting from my voltmeter , thanks

#include <WiFi.h>
#include "ThingSpeak.h"

#include "BluetoothSerial.h"

#if !defined(CONFIG_BT_ENABLED) || !defined(CONFIG_BLUEDROID_ENABLED)
#error Bluetooth is not enabled! Please run make menuconfig to and enable it
#endif

float adc_voltage = 0.0;
float adc_voltage1 = 0.0;
float R1 = 30000.0;
float R2 = 7500.0;
float ref_voltage = 17.0;
float adc_value = 0;

WiFiClient client;

unsigned long myChannelNumber = 1714718;
const char * myWriteAPIKey = "9U3QMIMX97S6QCUE";

// Timer variables
unsigned long lastTime = 0;
unsigned long timerDelay = 30000;

unsigned long lastTime1 = 0;
unsigned long timerDelay1 = 30000;

#include "BluetoothSerial.h"

int fl=0;
#if !defined(CONFIG_BT_ENABLED) || !defined(CONFIG_BLUEDROID_ENABLED)
#error Bluetooth is not enabled! Please run make menuconfig to and enable it
#endif
String ssid="BTBHub6-36JX"; // your network SSID (name)
String password="FUqJi7uU7AJE";

char* ssid1="Raheem";
char* password1="kolachi";
BluetoothSerial SerialBT;

void setup() {
Serial.begin(9600); //Initialize serial
WiFi.mode(WIFI_STA);
ThingSpeak.begin(client);
SerialBT.begin("Boat"); //Bluetooth device name
Serial.println("The device started, now you can pair it with bluetooth!");
pinMode(33,OUTPUT);
pinMode(32,OUTPUT);
delay(5000);

//blue();
}

void blue(){
Serial.println("Enter wifi Name");
ab:
digitalWrite(33,HIGH);
if (Serial.available()) {
SerialBT.write(Serial.read());
}
if (SerialBT.available()) {
ssid =SerialBT.readString();
Serial.print(ssid);

}
else {
goto ab;
}

Serial.println("Enter password");
ac:
digitalWrite(33,LOW);
digitalWrite(32,HIGH);
if (Serial.available()) {
SerialBT.write(Serial.read());
}
if (SerialBT.available()) {
password =SerialBT.readString();
Serial.print(password);
fl=1;
}
else {
goto ac;
}

}

void battery1(){
update1:
adc_value = analogRead(35);
Serial.print("b1");
Serial.println(adc_value); // lets assume
adc_voltage = (adc_value * ref_voltage) / 4096.0;

Serial.println(adc_voltage);
if ((millis() - lastTime) > timerDelay) {

// Connect or reconnect to WiFi
if(WiFi.status() != WL_CONNECTED){
  digitalWrite(33,HIGH);
  digitalWrite(32,HIGH);
  Serial.print("Attempting to connect");
  while(WiFi.status() != WL_CONNECTED){
    WiFi.begin(ssid.c_str(), password.c_str()); 
    delay(5000);
    if(WiFi.status() != WL_CONNECTED){
      Serial.println("Enter correct wifi and pass");
      //blue();
    }
  } 
  Serial.println("\nConnected.");
}
delay(1000);
int x = ThingSpeak.writeField(myChannelNumber, 1,adc_voltage, myWriteAPIKey);


if(x == 200){
  digitalWrite(33,LOW);
  digitalWrite(32,LOW);
  Serial.println("Channel update successful.");
}
else{
  Serial.println("Problem updating channel. HTTP error code " + String(x));
  goto update1;
}
lastTime = millis();

}

}

void battery2(){
update2:

adc_value = analogRead(34);
Serial.print("b2");
Serial.println(adc_value);
adc_voltage1 = (adc_value * ref_voltage) / 4096.0;
Serial.println(adc_voltage1);
if ((millis() - lastTime1) > timerDelay1) {

// Connect or reconnect to WiFi
if(WiFi.status() != WL_CONNECTED){
  Serial.print("Attempting to connect");
  while(WiFi.status() != WL_CONNECTED){
    WiFi.begin(ssid.c_str(), password.c_str());  
    delay(5000);  
     if(WiFi.status() != WL_CONNECTED){
      Serial.println("Enter correct wifi and pass");
     // blue();
    }   
  } 
  Serial.println("\nConnected.");
}
delay(1000);
int z = ThingSpeak.writeField(myChannelNumber, 2,adc_voltage1, myWriteAPIKey);


if(z == 200){
  digitalWrite(33,LOW);
  digitalWrite(32,LOW);
  Serial.println("Channel 2 update successful.");
}
else{
  Serial.println("Problem updating channel 2. HTTP error code " + String(z));
  goto update2;
}
lastTime1 = millis();

}
}

void loop() {
if (Serial.available()) {
SerialBT.write(Serial.read());
}
if (SerialBT.available()) {
char fl =SerialBT.read();
delay(5000);
if (fl=='2'){
blue();
}

}
battery1();
delay(1000);
battery2();
delay(1000);
}