void a0_pin_state() {
Serial.println(digitalRead(A0));
}
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
pinMode(A0,INPUT_PULLUP);
attachInterrupt(digitalPinToInterrupt(A0), a0_pin_state, CHANGE);
}
void loop() {
// put your main code here, to run repeatedly:
//Serial.println("");
//Serial.println(digitalRead(A0));
//Serial.println(analogRead(A0));
delay(100);
}