int potPin = A0; // 가변저항이 연결된 아날로그 핀
int potValue = 0; // 가변저항 값 저장 변수
void setup() {
Serial.begin(9600); // 시리얼 통신 시작 (9600bps)
}
void loop() {
potValue = analogRead(potPin); // 아날로그 값 읽기 (0 ~ 1023)
Serial.print("가변저항 값: ");
Serial.println(potValue); // 시리얼 모니터에 값 출력
delay(200); // 0.2초 대기 후 반복
}