#define SWITCH_PIN A3 // スイッチ接続ピン
void setup() {
Serial.begin(9600); // シリアル初期化
pinMode(SWITCH_PIN, INPUT); // デフォルトはINPUTなのでなくてもOK
}
void loop() {
int sensorValue = analogRead(SWITCH_PIN); // ピンの電圧値を読み取り
Serial.println(sensorValue); // シリアルモニタに表示
delay(500); // 時間待ち
}