User Manual
Table Of Contents

59
Further Exploration
You can slightly modify the hardware and software based on this experiment to make a
dice. For hardware, add a button to the original board.
Build the circuit:
Next, go to 11_Segment, and compile dice.c
gcc dice.c –o dice –lwiringPi
Run
sudo ./dice
Now you should see a number flashing between 0 and 6 quickly on the segment display.
Press the button on the breadboard, and the display will statically display a random
number between 0 and 6 for 2 seconds and then circularly flash randomly between 0 and
6 again.










