Update sample to output the tapped button index