//try this arduino code
void setup()
{
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
pinMode(7, OUTPUT);
pinMode(8, OUTPUT);
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
}
void ring()
{
digitalWrite(6,HIGH);
digitalWrite(10,HIGH);
digitalWrite(4,HIGH);
digitalWrite(2,HIGH);
digitalWrite(8,HIGH);
delay(200);
digitalWrite(10,LOW);
digitalWrite(4,LOW);
digitalWrite(2,LOW);
digitalWrite(8,LOW);
delay(200);
digitalWrite(6,HIGH);
digitalWrite(5,HIGH);
digitalWrite(3,HIGH);
digitalWrite(7,HIGH);
digitalWrite(9,HIGH);
delay(200);
digitalWrite(5,LOW);
digitalWrite(3,LOW);
digitalWrite(7,LOW);
digitalWrite(9,LOW);
delay(200);
digitalWrite(6,LOW);
}
void arr()
{
digitalWrite(2, HIGH);
delay(200);
digitalWrite(3, HIGH);
delay(200);
digitalWrite(4, HIGH);
delay(200);
digitalWrite(5, HIGH);
delay(200);
digitalWrite(6, HIGH);
delay(200);
digitalWrite(7, HIGH);
delay(200);
digitalWrite(8, HIGH);
delay(200);
digitalWrite(9, HIGH);
delay(200);
digitalWrite(10, HIGH);
delay(200);
digitalWrite(10, LOW);
delay(200);
digitalWrite(9, LOW);
delay(200);
digitalWrite(8, LOW);
delay(200);
digitalWrite(7, LOW);
delay(200);
digitalWrite(6, LOW);
delay(200);
digitalWrite(5, LOW);
delay(200);
digitalWrite(4, LOW);
delay(200);
digitalWrite(3, LOW);
delay(200);
digitalWrite(2, LOW);
delay(200);
}
void rot()
{
digitalWrite(6, HIGH);
delay(250);
digitalWrite(8, HIGH);
delay(200);
digitalWrite(8, LOW);
delay(150);
digitalWrite(7, HIGH);
delay(200);
digitalWrite(7, LOW);
delay(150);
digitalWrite(2, HIGH);
delay(200);
digitalWrite(2, LOW);
delay(150);
digitalWrite(3, HIGH);
delay(200);
digitalWrite(3, LOW);
delay(150);
digitalWrite(4, HIGH);
delay(200);
digitalWrite(4, LOW);
delay(150);
digitalWrite(5, HIGH);
delay(200);
digitalWrite(5, LOW);
delay(150);
digitalWrite(10, HIGH);
delay(300);
digitalWrite(10, LOW);
delay(150);
digitalWrite(9, HIGH);
delay(300);
digitalWrite(9, LOW);
delay(150);
digitalWrite(5,LOW);
}
void race()
{
digitalWrite(8, HIGH);
digitalWrite(7, HIGH);
digitalWrite(2, HIGH);
delay(300);
digitalWrite(9, HIGH);
digitalWrite(6, HIGH);
digitalWrite(3, HIGH);
delay(300);
digitalWrite(10, HIGH);
digitalWrite(5, HIGH);
digitalWrite(4, HIGH);
delay(300);
digitalWrite(8, LOW);
digitalWrite(7, LOW);
digitalWrite(2, LOW);
delay(300);
digitalWrite(9, LOW);
digitalWrite(6, LOW);
digitalWrite(3, LOW);
delay(300);
digitalWrite(10, LOW);
digitalWrite(5, LOW);
digitalWrite(4, LOW);
delay(300);
}
void dia()
{
digitalWrite(4,HIGH);
delay(90);
digitalWrite(5,HIGH);
digitalWrite(3,HIGH);
delay(90);
digitalWrite(10,HIGH);
digitalWrite(6,HIGH);
digitalWrite(2,HIGH);
delay(90);
digitalWrite(9,HIGH);
digitalWrite(7,HIGH);
delay(90);
digitalWrite(8,HIGH);
delay(150);
digitalWrite(4,LOW);
delay(90);
digitalWrite(5,LOW);
digitalWrite(3,LOW);
delay(90);
digitalWrite(10,LOW);
digitalWrite(6,LOW);
digitalWrite(2,LOW);
delay(90);
digitalWrite(9,LOW);
digitalWrite(7,LOW);
delay(90);
digitalWrite(8,LOW);
delay(150);
}
void loop()
{
ring();
ring();
ring();
arr();
arr();
arr();
rot();
rot();
rot();
race();
race();
race();
dia();
dia();
dia();
delay(500);
}