Using Digit MXP to select autonomous mode using C++

Our team is trying to use the Digit MXP board to select autonomous mode via the A and B buttons. Not sure how to read the button press and increment the mode selected (e.g., 0 - do nothing, 1 - reach defense, etc.). It would also help to display the incrementing number on the display as feedback for the human player who is making the setting prior to the round.

Does anyone have an example in C++ of reading the buttons and updating the display? I did not find much information on how to use this board, except a LabVIEW example.

Any help would be appreciated.

Team 4103
Roborioles