/*
Dice Random
*/

//Die 1  
int LedPin1 =  2;    
int LedPin2 =  3;   
int LedPin3 =  4;   
int LedPin4 =  5;    
int LedPin5 =  6;   
int LedPin6 =  7; 

//Die 2
int LedPin7 =  8;    
int LedPin8 =  9;   
int LedPin9 =  10;   
int LedPin10 =  11;    
int LedPin11 =  12;   
int LedPin12 =  13;  
int startPin = 0;
int val=0;

void setup()   {                
  // initialize the digital pins as input or output.
 //Die 1 
 pinMode(LedPin1, OUTPUT);  
 pinMode(LedPin2, OUTPUT);  
 pinMode(LedPin3, OUTPUT);  
 pinMode(LedPin4, OUTPUT);  
 pinMode(LedPin5, OUTPUT);  
 pinMode(LedPin6, OUTPUT); 
// Die 2
 pinMode(LedPin7, OUTPUT);  
 pinMode(LedPin8, OUTPUT);  
 pinMode(LedPin9, OUTPUT);  
 pinMode(LedPin10, OUTPUT);  
 pinMode(LedPin11, OUTPUT);  
 pinMode(LedPin12, OUTPUT); 
 pinMode(startPin, INPUT);

randomSeed(analogRead(1));

}


void loop() { 
val = analogRead(startPin); //Read Start Button
if (val>500)  //Button Pushed
   
{
  
digitalWrite(2,LOW); 
digitalWrite(3,LOW);
digitalWrite(4,LOW);
digitalWrite(5,LOW);
digitalWrite(6,LOW);
digitalWrite(7,LOW);

digitalWrite(8,LOW); 
digitalWrite(9,LOW);
digitalWrite(10,LOW);
digitalWrite(11,LOW);
digitalWrite(12,LOW);
digitalWrite(13,LOW);
  

int d=200;
 
//1
int randNumber = random(2, 8);
digitalWrite(randNumber,HIGH); 
delay(d);
digitalWrite(randNumber,LOW); 
randNumber = random(9, 14);
digitalWrite(randNumber,HIGH); 
delay(d);
digitalWrite(randNumber,LOW); 

//2
randNumber = random(2, 8);
digitalWrite(randNumber,HIGH); 
delay(d);
digitalWrite(randNumber,LOW); 
randNumber = random(9, 14);
digitalWrite(randNumber,HIGH); 
delay(d);
digitalWrite(randNumber,LOW); 

//3
randNumber = random(2, 8);
digitalWrite(randNumber,HIGH); 
delay(d);
digitalWrite(randNumber,LOW); 
randNumber = random(9, 14);
digitalWrite(randNumber,HIGH); 
delay(d);
digitalWrite(randNumber,LOW); 

//4
randNumber = random(2, 8);
digitalWrite(randNumber,HIGH); 
delay(d);
digitalWrite(randNumber,LOW); 
randNumber = random(9, 14);
digitalWrite(randNumber,HIGH); 
delay(d);
digitalWrite(randNumber,LOW); 

//5
randNumber = random(2, 8);
digitalWrite(randNumber,HIGH); 
delay(d);
digitalWrite(randNumber,LOW); 
randNumber = random(9, 14);
digitalWrite(randNumber,HIGH); 
delay(d);
digitalWrite(randNumber,LOW);

//6
randNumber = random(2, 8);
digitalWrite(randNumber,HIGH); 
randNumber = random(9, 14);
digitalWrite(randNumber,HIGH); 


}
}