int analogValue = 0;
int analogPin = 12;
float tegangan = 0;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
}
void loop() {
// put your main code here, to run repeatedly:
analogValue = analogRead(analogPin);
Serial.print("Row Value: ");
Serial.println(analogValue);
tegangan = analogValue * (3.3/4095);
Serial.print("Tegangan: ");
Serial.println(tegangan);
delay(1000); // this speeds up the simulation
}