1int onePin = 1;
2int twoPin = 2;
3int threePin = 3;
4int fourPin = 4;
5int fivePin = 5;
6int sixPin = 6;
7void setup() {
8
9Serial.begin(9600);
10randomSeed(analogRead(0));
11pinMode(onePin,OUTPUT);
12pinMode(twoPin,OUTPUT);
13pinMode(threePin,OUTPUT);
14pinMode(fourPin,OUTPUT);
15pinMode(fivePin,OUTPUT);
16pinMode(sixPin,OUTPUT);
17}
18
19void loop() {
20int number = random(1,7);
21if (number==1)
22 one();
23else if(number==2)
24 two();
25else if (number==3)
26 three();
27else if (number==4)
28 four();
29else if (number==5)
30 five();
31else if (number==6)
32 six();
33}
34void one()
35 {
36 Serial.println("one");
37 digitalWrite(onePin,HIGH);
38 delay(50000);
39 digitalWrite(onePin,LOW);
40 delay(1000);
41 }
42void two()
43 {
44 Serial.println("two");
45 digitalWrite(onePin,HIGH);
46 digitalWrite(twoPin,HIGH);
47 delay(50000);
48 digitalWrite(onePin,LOW);
49 digitalWrite(twoPin,LOW);
50 delay(1000);
51 }
52void three()
53 {
54 Serial.println("three");
55 digitalWrite(onePin,HIGH);
56 digitalWrite(twoPin,HIGH);
57 digitalWrite(threePin,HIGH);
58 delay(50000);
59 digitalWrite(onePin,LOW);
60 digitalWrite(twoPin,LOW);
61 digitalWrite(threePin,LOW);
62 delay(1000);
63 }
64void four()
65 {
66 Serial.println("four");
67 digitalWrite(onePin,HIGH);
68 digitalWrite(twoPin,HIGH);
69 digitalWrite(threePin,HIGH);
70 digitalWrite(fourPin,HIGH);
71 delay(50000);
72 digitalWrite(onePin,LOW);
73 digitalWrite(twoPin,LOW);
74 digitalWrite(threePin,LOW);
75 digitalWrite(fourPin,LOW);
76 delay(1000);
77 }
78void five()
79 {
80 Serial.println("five");
81 digitalWrite(onePin,HIGH);
82 digitalWrite(twoPin,HIGH);
83 digitalWrite(threePin,HIGH);
84 digitalWrite(fourPin,HIGH);
85 digitalWrite(fivePin,HIGH);
86 delay(50000);
87 digitalWrite(onePin,LOW);
88 digitalWrite(twoPin,LOW);
89 digitalWrite(threePin,LOW);
90 digitalWrite(fourPin,LOW);
91 digitalWrite(fivePin,LOW);
92 delay(1000);
93 }
94void six()
95 {
96 Serial.println("six");
97 digitalWrite(onePin,HIGH);
98 digitalWrite(twoPin,HIGH);
99 digitalWrite(threePin,HIGH);
100 digitalWrite(fourPin,HIGH);
101 digitalWrite(fivePin,HIGH);
102 digitalWrite(sixPin,HIGH);
103 delay(50000);
104 digitalWrite(onePin,LOW);
105 digitalWrite(twoPin,LOW);
106 digitalWrite(threePin,LOW);
107 digitalWrite(fourPin,LOW);
108 digitalWrite(fivePin,LOW);
109 digitalWrite(sixPin,LOW);
110 delay(1000);
111 }
112
113
114