updated arduino code for buttons.