void setup() { Serial.begin(9600); // put your setup code here, to run once: pinMode(1,INPUT); pinMode(16,INPUT); attachInterrupt(1,button1Pressed,RISING); attachInterrupt(16,button2Pressed,RISING); } void loop() { // put your main code here, to run repeatedly: } void button1Pressed(){ Serial.print('a'); delay(100); } void button2Pressed(){ Serial.print('b'); delay(100); }