Skip to content

Instantly share code, notes, and snippets.

@matthijskooijman
Last active August 29, 2015 14:08
Show Gist options
  • Save matthijskooijman/478727b188d41130ea73 to your computer and use it in GitHub Desktop.
Save matthijskooijman/478727b188d41130ea73 to your computer and use it in GitHub Desktop.
/*
To test:
- Upload this sketch to the Arduino Due
- Open the serial monitor at 115200
- Connect a jumper wire to ground and touch the other end to pins 25 and 26, alternating between them
*/
void int25() {
Serial.println("INT25");
}
void int26() {
Serial.println("INT26");
}
void setup() {
Serial.begin(115200);
pinMode(25, INPUT_PULLUP);
pinMode(26, INPUT_PULLUP);
attachInterrupt(25, int25, CHANGE);
attachInterrupt(26, int26, CHANGE);
detachInterrupt(26);
}
void loop() {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment