const int POTENTIOMETER_PIN= A0;
const int BUTTON_PIN= 2;
void setup() {
pinMode(POTENTIOMETER_PIN, INPUT);
pinMode(BUTTON_PIN, INPUT_PULLUP);
Serial.begin(9600);
}
void loop() {
int potentiometerValue = analogRead(POTENTIOMETER_PIN);
bool buttonState = digitalRead(BUTTON_PIN);
Serial.print("Potentiometer Value: ");
Serial.println(potentiometerValue);
Serial.print("Button State: ");
Serial.println(buttonState);
}