Hello, this is very easy sequence, I believe you have an LCD as well to print these data or do you want to use the serial monitor?
Also, would you like the button to be interrupt based or polling based?
All cases are easy and simple ^_^
Contact me for more info and sharing the code.
Thank you.