Intro: 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
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
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.
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.
Make sure your arduino is connected to arduino program through tools.