int potPin = A0; // Analog pin where the sensor is connected
int dt = 500; // Delay time in milliseconds
void setup() {
Serial.begin(9600); // Start serial communication at 9600 baud
pinMode(potPin, INPUT);
}
void loop() {
int potValue = analogRead(potPin); // Read analog value from the sensor
// Print the analog value and its corresponding voltage
Serial.print("Potentiomenter Reading = ");
Serial.print(potValue);
delay(dt); // Wait for 500 milliseconds before the next reading
}