Introduction: 7-segment Display Random Number Generator (SSD RNG)

Picture of 7-segment Display Random Number Generator (SSD RNG)

This is my second-ever built arduino-based application. Easy and rewarding to actually see your program to work as intended.

Step 1: Parts

To start with I used the following parts:

- Funduino uno (identical to arduino uno) (in my opinion)

- seven male-to-male cables

- 7-segment display

- random resistors

- breadboard

Resistors are for resisting the current flow from breaking the segments, but I DID try the display straight without any resistors and the display didn't break within 2 minutes, although it warmed up fairly well so stick to the resistors. I used as many resistors as needed to make the display visible enough (i have a small box full of resistors but no idea of the value so i just tried). The basic idea is that the more resistors you have, the higher the current.

Step 2: Assembly

Picture of Assembly

Use the picture of the SSD to determine which pin activates corresponding segment. One pin activates one segment (including dot) and the pins in the middle on both sides are connected together and goes to ground.

The idea is very simple: To activate number 1, you need to illuminate segments on the right side of the display. in the picture they are called segments b and c. Connect your arduino pins as you wish but in a reasonable order to make it simple.

My fast-drawn graph of the assembly shows how I connected pins.

Step 3: Code

If you feel lazy, download this sketch and upload into your arduino.

Enjoy!

PS. If you're ambitious, you can add some lines in the code: To make it more random, use serial.begin() and randomseed() to alternate the number sequence and the serial.print to follow them also in the serial monitor. I leave the research for you for now, but If someone desperately needs it - just comment below and i'll publish it here.

Troubleshooting:

Make sure your arduino is connected to arduino program through tools.

Comments

DIY Hacks and How Tos (author)2015-12-20

This would be a great way to make a random dice roller.

Sure does!

About This Instructable

1,456views

7favorites

License:

More by iMarso:7-segment display random number generator (SSD RNG)
Add instructable to: