const int potentiometerPin = A0; // Analog pin to which the potentiometer is connected
void setup() {
Serial.begin(9600); // Initialize serial communication
}
void loop() {
// Read the analog value from the potentiometer
int potValue = analogRead(potentiometerPin);
// Print the potentiometer value to the Serial Monitor
Serial.print("Potentiometer Value: ");
Serial.println(potValue);
delay(1000); // Add a small delay for stability
}