Using new Arduino iot Cloud reading voltage

I,m a total beginner with iot Cloud and i just want to display voltage measured with my Wemos D1 Mini (ESP8266). I have connected 1.44Mohm resistor between analog A0 and my car battery and i can get the code to work in Serial monitor, but i just can,t understand how i can display the voltage in Arduino cloud dashboard.

The code compiles and i have tried alot, but no voltage is displaying.

Here is my code:

int vPin = A0;
int measuredVoltage;

#include "thingProperties.h"

void setup() {
  // Initialize serial and wait for port to open:
  Serial.begin(9600);
  pinMode(vPin, INPUT);
  // This delay gives the chance to wait for a Serial Monitor without blocking if none is found
  delay(1500); 

  // Defined in thingProperties.h
  initProperties();

  // Connect to Arduino IoT Cloud
  ArduinoCloud.begin(ArduinoIoTPreferredConnection);
  
  /*
     The following function allows you to obtain more information
     related to the state of network and IoT Cloud connection and errors
     the higher number the more granular information you’ll get.
     The default is 0 (only errors).
     Maximum is 4
 */
  setDebugMessageLevel(2);
  ArduinoCloud.printDebugInfo();
}

void loop() {
  ArduinoCloud.update();
  int realVoltage = analogRead(vPin);
  int measuredVoltage = (15.3 / 1023) * realVoltage;
  
  /*battery_Monitor = analogRead(realVoltage); */
  Serial.println(realVoltage);
}

That's the wrong way to measure voltage. Luck You used such high ohm resistor. Else Your controller had disappeard in smoke.
Learn what a voltage divider is and how to calculate the resistor values. Knowing Ohm's law is also needed.

No, thats not luck. I know that i must use 1.44Mohm resistor for measured up to around 16V and i know that the Wemos D1 Mini has an internal voltage divider with 220K and 100K resistor.

I finally get it to work now and voltage is reading fine in the Arduino iot cloud.

My Wemos D1 Mini stay connected after i unplug it from computer with external power.

But i can,t update the code via the cloud. Can someone tell me why?
Yes i have purchased an subscription.

Her is my last code that works, but not for updateing via the cloud.

#include "thingProperties.h"

int inputPIN = A0;
float voltage;


void setup() {
// Initialize serial and wait for port to open:
Serial.begin(9600);
// This delay gives the chance to wait for a Serial Monitor without blocking if none is found
delay(1500);
pinMode(inputPIN, INPUT);

// Defined in thingProperties.h
initProperties();
// Connect to Arduino IoT Cloud

ArduinoCloud.begin(ArduinoIoTPreferredConnection);

setDebugMessageLevel(2);
ArduinoCloud.printDebugInfo();
}

void loop() {
ArduinoCloud.update();

int realVoltage = analogRead(inputPIN);
outVoltage = (15.3 / 1023) * realVoltage;


Serial.println(outVoltage);

}

Just forget it.

I converted to Blynk and it works fine there.