This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// pin is 2. | |
const int multiButton = 2; | |
void setup() { | |
// Configure the pin mode as an input. | |
pinMode(multiButton, INPUT); | |
// Attach an interrupt to the pin, assign the onChange function as a handler and trigger on changes (LOW or HIGH). | |
attachInterrupt(multiButton, onChange, CHANGE); | |