iRhythm Technologies Interview Question

How would you detect a button press using a microcontroller?