Help for a Newbie - Single Digit 7 Segment

I'm new to the Arduino world and was looking for some help. I would like to use a 7 segment display with multiple switches...I'd like to be able to depress a switch and have the display show 3...depress a different switch and get 5 and so on. This is actually for a game. Any guidance would be greatly appreciated. Thank you.

It would be best to use a shift register to control the 7-segment display and use digitalRead() for the buttons. Use the wiring diagram for the shift register and the code will need to be edited a little. remove the second shiftout for the second shift register disregard all wires for it. In the diagram connect the segment display to the q outputs. The ouputs for the shift register are in binary. B10010010 Turns on lights connected to 1, 4, and 7.

Shift_Register_Test.ino (403 Bytes)