LED Random Picker
LED Random Picker is a special picker made for people who got issues picking things. Sometimes if gets hard for people to pick things, but this picker can efficiently help you to pick when it is hard. The inspiration is from here : https://www.instructables.com/5-Simple-Button-and-...
There is 10 LEDs on the board, On each light, there will be a paper with numbers on it. When the light shines on a number, it means this is the choice you should pick.
Step 1: Prepare All Materials You Need
In this project, we need
Led x 10 (Any color)
Resistor x 10
Dupont Line x 12
Arduino x 1
Breadboard x 1
Step 2 : Cables
As you see, these photos are the cables of the picker. Please put them together like the following
Step 3 : the Exterior of Project
The exterior look of the project is made of cardboard and paper. To show the numbers using LED, you need to place the paper above the lights. So we need to make a cover on it. The cover looks like the picture above.
Step 4 : Codes
int LED0 = 2;
int LED1 = 3;
int LED2 = 4;
int LED3 = 5;
int LED4 = 6;
int LED5 = 7;
int LED6 = 8;
int LED7 = 9;
int LED8 = 10;
int LED9 = 11;
long randomNumber;
void setup() {
Serial.begin(9600); Serial.println("Randon Numbernesssssss");
pinMode(LED0, OUTPUT);
pinMode(LED1, OUTPUT);
pinMode(LED2, OUTPUT);
pinMode(LED3, OUTPUT);
pinMode(LED4, OUTPUT);
pinMode(LED5, OUTPUT);
pinMode(LED6, OUTPUT);
pinMode(LED7, OUTPUT);
pinMode(LED8, OUTPUT);
pinMode(LED9, OUTPUT);
randomSeed( analogRead(A0) ); }
void loop() {
randomNumber = random(2,12);
Serial.println(randomNumber);
digitalWrite(randomNumber,HIGH);
delay(3000); 改
digitalWrite(randomNumber,LOW); }
Finish!
Decorate it to make it better!