#define POT_PIN A0 // Potentiometer connected to analog pin A0
void setup() {
Serial.begin(9600); // Start serial communication
}
void loop() {
int potValue = analogRead(POT_PIN); // Read potentiometer value
Serial.print("Potentiometer Value: ");
Serial.println(potValue); // Print value to serial monitor
delay(500); // Wait for 500ms
}