// /*
//   Empowerment Technology
//   iParol v2 (PHS - STEM)
//   s.2023
// */

// //******************************************
// // USE write() in replace to digitalWrite()
// // The diagram uses 16x16 matrix. Note that the 16th adress will not work
// // This will work with 15x15 boards
// //******************************************

#include "MUX_iParol.h"

byte All[] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 
61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 
121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165,
166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225};
byte Petal1[] = {32, 33, 48, 34, 49, 64, 35, 50, 51, 65};
byte Petal2[] = {107, 108, 94, 109, 124, 95, 110, 125, 96, 126, 97, 127 };
byte Petal3[] = {182, 168, 183, 154, 169, 184, 155, 170, 171, 185};
byte Petal4[] = {202,203,187,188,189,173,174,158,159,160,144,145};
byte Petal5[] = {101,116,131,117};
byte Petal6[] = {22,23,37,38,39,53,54,68,69,70,84,85};
byte Yellow[] = {1,16,46,61,76,91,121,136,151,166,196,211,2,3,62,77,78,137,152,138,212,213};
byte Bly[] = {10,11,12,13,14,15,26,27,28,29,30,42,43,44,45,58,59,60,73,74,75,88,89,90,105,120,
135,148,149,150,163,164,165,178,179,180,192,193,194,195,206,207,208,209,210,220,221,222,223,
224,225};
byte Flower[] = {6,7,8,17,18, 19, 20, 21, 22, 23, 24, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 47, 48, 49, 50, 51, 52, 53, 54, 55, 63, 64, 65, 66, 67, 68, 69, 70, 71, 79, 80, 81, 82, 83, 84, 85, 86, 87, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 139, 140, 141, 142, 143, 144, 145, 146, 147, 153, 154, 155, 156, 157, 158, 159, 160, 161, 167, 168, 169, 170, 171, 172, 173, 174, 175, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 197, 198, 199, 200, 201, 202, 203, 204, 216, 217, 218};
byte Petal1B[] = {32, 33, 48, 34, 49, 64, 35, 50, 51, 65,66,80,79,63,47,31,17,18,19,20};
byte Petal2B[] = {107, 108, 94, 109, 124, 95, 110, 125, 96, 126, 97, 127,93,92,106,123,139,122,140,156};
byte Petal3B[] = {182, 168, 183, 154, 169, 184, 155, 170, 171, 185,167,181,197,198,199,200,153};
byte Petal4B[] = {202,203,187,188,189,173,174,158,159,160,144,145,115,130,129,143,157,172,186,201,216,217,218,204,190,175,161,146,147,132};
byte Petal5B[] = {101,116,131,117,87,102,103,119,118,133,132,147};
byte Petal6B[] = {22,23,37,38,39,53,54,68,69,70,84,85,100,99,83,67,52,36,21,6,8,24,40,55,71,86,7};
byte Cross[] = {47,48,49,50,51,19,34,64,79,139,154,199,184,171,170,169,168,167,143,128,83,98,115,114,113,112,111,59,58,56,55,27,42,57,72,87,207,192,147,162,179,178,177,176,175};






//stay
void turnOn(byte colorArray[], byte size) {
  for (byte i = 0; i < size; i++) {
    write(colorArray[i], HIGH);
  }
}

void turnOff(byte colorArray[], byte size) {
  for (byte i = 0; i < size; i++) {
    write(colorArray[i],LOW);
  }
}

void setup() {
  //you dont need to write anything here
  iParol_Init();
}

void loop(){
Intro();
}

void Intro(){
Start();  
Leaf();
LeafBg();
Pattern2();
}

//Sequences
//Intro Part

void Start(){
write(112,HIGH);write(113,HIGH);write(114,HIGH);write(98,HIGH);write(128,HIGH);
delay(85);;
write(97,HIGH);write(127,HIGH);write(99,HIGH);write(129,HIGH);
delay(85);;
write(81,HIGH);write(96,HIGH);write(111,HIGH);write(126,HIGH);write(141,HIGH);write(82,HIGH);write(83,HIGH);write(84,HIGH);write(85,HIGH);write(100,HIGH);write(115,HIGH);write(130,HIGH);write(145,HIGH);write(144,HIGH);write(143,HIGH);write(142,HIGH);
delay(85);;
write(65,HIGH);write(80,HIGH);write(95,HIGH);write(110,HIGH);write(125,HIGH);write(140,HIGH);write(155,HIGH);write(156,HIGH);write(157,HIGH);write(158,HIGH);write(159,HIGH);write(160,HIGH);write(161,HIGH);write(146,HIGH);write(131,HIGH);write(116,HIGH);write(101,HIGH);write(86,HIGH);write(71,HIGH);write(70,HIGH);write(69,HIGH);write(68,HIGH);write(67,HIGH);write(66,HIGH);
delay(85);;
write(33,HIGH);write(48,HIGH);write(63,HIGH);write(78,HIGH);write(93,HIGH);write(108,HIGH);write(123,HIGH);write(138,HIGH);write(34,HIGH);write(49,HIGH);write(64,HIGH);write(79,HIGH);write(94,HIGH);write(109,HIGH);write(124,HIGH);write(139,HIGH);write(154,HIGH);write(169,HIGH);write(184,HIGH);write(153,HIGH);write(168,HIGH);write(183,HIGH);write(35,HIGH);write(36,HIGH);write(37,HIGH);write(38,HIGH);
write(39,HIGH);write(40,HIGH);write(41,HIGH);write(42,HIGH);write(43,HIGH);write(50,HIGH);write(51,HIGH);write(52,HIGH);write(53,HIGH);write(54,HIGH);write(55,HIGH);write(56,HIGH);write(57,HIGH);write(58,HIGH);write(73,HIGH);write(88,HIGH);write(103,HIGH);write(118,HIGH);write(133,HIGH);write(148,HIGH);write(163,HIGH);write(178,HIGH);write(193,HIGH);write(72,HIGH);write(87,HIGH);write(102,HIGH);
write(117,HIGH);write(132,HIGH);write(147,HIGH);write(162,HIGH);write(177,HIGH);write(192,HIGH);write(185,HIGH);write(186,HIGH);write(187,HIGH);write(188,HIGH);write(189,HIGH);write(190,HIGH);write(191,HIGH);write(170,HIGH);write(171,HIGH);write(172,HIGH);write(173,HIGH);write(174,HIGH);write(175,HIGH);write(176,HIGH);
delay(85);;
write(1,HIGH);write(16,HIGH);write(31,HIGH);write(46,HIGH);write(61,HIGH);write(76,HIGH);write(91,HIGH);write(106,HIGH);write(121,HIGH);write(136,HIGH);write(151,HIGH);write(166,HIGH);write(181,HIGH);write(196,HIGH);write(211,HIGH);write(212,HIGH);write(213,HIGH);write(214,HIGH);write(215,HIGH);write(216,HIGH);write(217,HIGH);write(218,HIGH);write(219,HIGH);write(220,HIGH);write(221,HIGH);write(222,HIGH);write(223,HIGH);write(224,HIGH);write(225,HIGH);
write(210,HIGH);write(195,HIGH);write(180,HIGH);write(165,HIGH);write(150,HIGH);write(135,HIGH);write(120,HIGH);write(105,HIGH);write(90,HIGH);write(75,HIGH);write(60,HIGH);write(45,HIGH);write(30,HIGH);write(15,HIGH);write(14,HIGH);write(13,HIGH);write(12,HIGH);write(11,HIGH);write(10,HIGH);write(9,HIGH);write(8,HIGH);write(7,HIGH);write(6,HIGH);write(5,HIGH);write(4,HIGH);write(3,HIGH);write(2,HIGH);write(17,HIGH);write(32,HIGH);write(47,HIGH);write(62,HIGH);write(77,HIGH);write(92,HIGH);write(107,HIGH);write(122,HIGH);write(137,HIGH);write(152,HIGH);write(167,HIGH);write(182,HIGH);write(197,HIGH);write(198,HIGH);write(199,HIGH);write(200,HIGH);write(201,HIGH);write(202,HIGH);write(203,HIGH);write(204,HIGH);write(205,HIGH);write(206,HIGH);write(207,HIGH);write(208,HIGH);write(209,HIGH);write(194,HIGH);write(179,HIGH);write(164,HIGH);write(149,HIGH);
write(134,HIGH);write(119,HIGH);write(104,HIGH);write(89,HIGH);write(74,HIGH);write(59,HIGH);write(44,HIGH);write(29,HIGH);write(28,HIGH);write(27,HIGH);write(26,HIGH);write(25,HIGH);write(24,HIGH);write(23,HIGH);write(22,HIGH);write(21,HIGH);write(20,HIGH);write(19,HIGH);write(18,HIGH);write(17,HIGH);
delay(85);;
turnOff(All, sizeof(All) / sizeof(All[0]));
delay(85);;
write(81,HIGH);write(111,HIGH);write(141,HIGH);write(82,HIGH);write(112,HIGH);write(142,HIGH);write(98,HIGH);write(113,HIGH);write(128,HIGH);write(114,HIGH);
delay(85);;
write(71,HIGH);write(86,HIGH);write(87,HIGH);write(102,HIGH);write(103,HIGH);write(119,HIGH);write(118,HIGH);write(133,HIGH);write(132,HIGH);write(147,HIGH);write(146,HIGH);write(161,HIGH);
delay(85);;
write(71,LOW);write(86,LOW);write(87,LOW);write(102,LOW);write(103,LOW);write(119,LOW);write(118,LOW);write(133,LOW);write(132,LOW);write(147,LOW);write(146,LOW);write(161,LOW);
delay(85);;
write(71,HIGH);write(86,HIGH);write(87,HIGH);write(102,HIGH);write(103,HIGH);write(119,HIGH);write(118,HIGH);write(133,HIGH);write(132,HIGH);write(147,HIGH);write(146,HIGH);write(161,HIGH);
delay(85);;
write(80,HIGH);write(66,HIGH);write(67,HIGH);write(52,HIGH);write(83,HIGH);write(99,HIGH);write(100,HIGH);write(115,HIGH);write(130,HIGH);write(129,HIGH);write(143,HIGH);write(157,HIGH);write(156,HIGH);write(140,HIGH);write(172,HIGH);
delay(85);;
write(79,HIGH);write(93,HIGH);write(92,HIGH);write(106,HIGH);write(122,HIGH);write(123,HIGH);write(139,HIGH);
delay(85);;
write(186,HIGH);write(201,HIGH);write(200,HIGH);write(199,HIGH);write(198,1);write(197,HIGH);write(181,HIGH);write(167,HIGH);write(153,HIGH);
delay(85);;
write(36,HIGH);write(21,HIGH);write(20,HIGH);write(19,HIGH);write(18,HIGH);write(17,HIGH);write(31,HIGH);write(47,HIGH);write(63,HIGH);
delay(85);;
write(6,HIGH);write(7,HIGH);write(8,HIGH);write(24,HIGH);write(40,HIGH);write(55,HIGH);
delay(85);;
write(216,HIGH);write(217,HIGH);write(218,HIGH);write(204,HIGH);write(190,HIGH);write(175,HIGH);
delay(85);;
}


void Leaf(){
  turnOn(Petal1, sizeof(Petal1) / sizeof(Petal1[0]));
  delay(85);;
  turnOn(Petal2, sizeof(Petal2) / sizeof(Petal2[0]));
  delay(85);;
  turnOn(Petal3, sizeof(Petal3) / sizeof(Petal3[0]));
  delay(85);;
  turnOn(Petal4, sizeof(Petal4) / sizeof(Petal4[0]));
  delay(85);;
  turnOn(Petal5, sizeof(Petal5) / sizeof(Petal5[0]));
  delay(85);;
  turnOn(Petal6, sizeof(Petal6) / sizeof(Petal6[0]));
  delay(85);;
  turnOff(Petal2, sizeof(Petal2) / sizeof(Petal2[0]));
  delay(85);;
  turnOff(Petal3, sizeof(Petal3) / sizeof(Petal3[0]));
  delay(85);;
  turnOff(Petal4, sizeof(Petal4) / sizeof(Petal4[0]));
  delay(85);;
  turnOff(Petal5, sizeof(Petal5) / sizeof(Petal5[0]));
  delay(85);;
  turnOff(Petal6, sizeof(Petal6) / sizeof(Petal6[0]));
  delay(85);;
  turnOff(Petal1, sizeof(Petal1) / sizeof(Petal1[0]));
  delay(85);;
  turnOn(Petal2, sizeof(Petal2) / sizeof(Petal2[0]));
  delay(85);;
  turnOff(Petal2, sizeof(Petal2) / sizeof(Petal2[0]));
  delay(85);;
  turnOn(Petal3, sizeof(Petal3) / sizeof(Petal3[0]));
  delay(85);;
  turnOff(Petal3, sizeof(Petal3) / sizeof(Petal3[0]));
  delay(85);;
  turnOn(Petal4, sizeof(Petal4) / sizeof(Petal4[0]));
  delay(85);;
  turnOff(Petal4, sizeof(Petal4) / sizeof(Petal4[0]));
  delay(85);;
  turnOn(Petal5, sizeof(Petal5) / sizeof(Petal5[0]));
  delay(85);;
  turnOff(Petal5, sizeof(Petal5) / sizeof(Petal5[0]));
  delay(85);;
  turnOn(Petal6, sizeof(Petal6) / sizeof(Petal6[0]));
  delay(85);;
  turnOff(Petal6, sizeof(Petal6) / sizeof(Petal6[0]));
  delay(85);;
  turnOn(Petal1, sizeof(Petal1) / sizeof(Petal1[0]));
  delay(85);;
  turnOff(Petal1, sizeof(Petal1) / sizeof(Petal1[0]));
  delay(85);;
  turnOn(Petal2, sizeof(Petal2) / sizeof(Petal2[0]));
  delay(85);;
  turnOff(Petal2, sizeof(Petal2) / sizeof(Petal2[0]));
  delay(85);;
  turnOn(Petal3, sizeof(Petal3) / sizeof(Petal3[0]));
  delay(85);;
  turnOff(Petal3, sizeof(Petal3) / sizeof(Petal3[0]));
  delay(85);;
  turnOn(Petal4, sizeof(Petal4) / sizeof(Petal4[0]));
  delay(85);;
  turnOff(Petal4, sizeof(Petal4) / sizeof(Petal4[0]));
  delay(85);;
  turnOn(Petal5, sizeof(Petal5) / sizeof(Petal5[0]));
  delay(85);;
  turnOff(Petal5, sizeof(Petal5) / sizeof(Petal5[0]));
  delay(85);;
  turnOn(Petal6, sizeof(Petal6) / sizeof(Petal6[0]));
  delay(85);;
  turnOff(Petal6, sizeof(Petal6) / sizeof(Petal6[0]));
  delay(85);;
  turnOn(Petal1, sizeof(Petal1) / sizeof(Petal1[0]));
  delay(85);;
  turnOff(Petal1, sizeof(Petal1) / sizeof(Petal1[0]));
  delay(85);;
  turnOn(Petal2, sizeof(Petal2) / sizeof(Petal2[0]));
  delay(85);;
  turnOff(Petal2, sizeof(Petal2) / sizeof(Petal2[0]));
  delay(85);;
  turnOn(Petal3, sizeof(Petal3) / sizeof(Petal3[0]));
  delay(85);;
  turnOff(Petal3, sizeof(Petal3) / sizeof(Petal3[0]));
  delay(85);;
  turnOn(Petal4, sizeof(Petal4) / sizeof(Petal4[0]));
  delay(85);;
  turnOn(Petal5, sizeof(Petal5) / sizeof(Petal5[0]));
  delay(85);;
  turnOn(Petal6, sizeof(Petal6) / sizeof(Petal6[0]));
  delay(85);;
  turnOn(Petal1, sizeof(Petal1) / sizeof(Petal1[0]));
  delay(85);;
  turnOn(Petal2, sizeof(Petal2) / sizeof(Petal2[0]));
  delay(85);;
  turnOn(Petal3, sizeof(Petal3) / sizeof(Petal3[0]));
  delay(85);;
}
 void LeafBg(){
write(57,HIGH);write(72,HIGH);write(104,HIGH);write(134,HIGH);write(162,HIGH);write(177,HIGH);
delay(85);;
write(25,HIGH);write(41,HIGH);write(56,HIGH);write(205,HIGH);write(191,HIGH);write(176,HIGH);
delay(85);;
write(25,LOW);write(41,LOW);write(56,LOW);write(205,LOW);write(191,LOW);write(176,LOW);
delay(85);;
write(25,HIGH);write(41,HIGH);write(56,HIGH);write(205,HIGH);write(191,HIGH);write(176,HIGH);
delay(85);;
write(9,HIGH);write(219,HIGH);
delay(85);;
write(4,HIGH);write(5,HIGH);write(214,HIGH);write(215,HIGH);
delay(85);;
write(31,HIGH);write(16,HIGH);write(1,HIGH);write(2,HIGH);write(3,HIGH);write(181,HIGH);write(196,HIGH);write(211,HIGH);write(212,HIGH);write(213,HIGH);
delay(85);;
write(46,HIGH);write(61,HIGH);write(62,HIGH);write(78,HIGH);write(166,HIGH);write(151,HIGH);write(152,HIGH);write(138,HIGH);
delay(85);;
write(76,HIGH);write(77,HIGH);write(91,HIGH);write(136,HIGH);write(137,HIGH);write(121,HIGH);
delay(85);;
write(10,HIGH);write(11,HIGH);write(26,HIGH);write(27,HIGH);write(42,HIGH);write(43,HIGH);write(44,HIGH);write(58,HIGH);write(59,HIGH);write(73,HIGH);write(74,HIGH);write(88,HIGH);write(89,HIGH);
write(220,HIGH);write(221,HIGH);write(206,HIGH);write(207,HIGH);write(192,HIGH);write(193,HIGH);write(194,HIGH);write(178,HIGH);write(179,HIGH);write(163,HIGH);write(164,HIGH);write(148,HIGH);write(149,HIGH);
delay(85);;
write(12,HIGH);write(13,HIGH);write(28,HIGH);write(29,HIGH);write(222,HIGH);write(223,HIGH);write(208,HIGH);write(209,HIGH);
delay(85);;
write(15,HIGH);write(30,HIGH);write(45,HIGH);write(60,HIGH);write(75,HIGH);write(90,HIGH);write(105,HIGH);write(120,HIGH);write(135,HIGH);write(150,HIGH);write(165,HIGH);write(180,HIGH);write(195,HIGH);write(210,HIGH);write(225,HIGH);write(14,HIGH);write(224,HIGH);
delay(85);;
for(byte i=0; i <= 225; i++){
  write(i,LOW);
}
write(112,HIGH);write(113,HIGH);write(114,HIGH);write(98,HIGH);write(128,HIGH);
delay(85);;
write(97,HIGH);write(127,HIGH);write(111,HIGH);write(83,HIGH);write(99,HIGH);write(115,HIGH);write(129,HIGH);write(143,HIGH);
delay(85);;
write(97,LOW);write(127,LOW);write(111,LOW);write(83,LOW);write(99,LOW);write(115,LOW);write(129,LOW);write(143,LOW);
delay(85);;
write(97,HIGH);write(127,HIGH);write(111,HIGH);write(83,HIGH);write(99,HIGH);write(115,HIGH);write(129,HIGH);write(143,HIGH);
delay(85);;
write(97,LOW);write(127,LOW);write(111,LOW);write(83,LOW);write(99,LOW);write(115,LOW);write(129,LOW);write(143,LOW);
delay(85);;
write(97,HIGH);write(127,HIGH);write(111,HIGH);write(83,HIGH);write(99,HIGH);write(115,HIGH);write(129,HIGH);write(143,HIGH);
delay(85);;
write(97,LOW);write(127,LOW);write(111,LOW);write(83,LOW);write(99,LOW);write(115,LOW);write(129,LOW);write(143,LOW);
delay(85);;
write(97,HIGH);write(127,HIGH);write(111,HIGH);write(83,HIGH);write(99,HIGH);write(115,HIGH);write(129,HIGH);write(143,HIGH);
delay(85);;
write(63,HIGH);write(64,HIGH);write(65,HIGH);write(49,HIGH);write(79,HIGH);write(153,HIGH);write(139,HIGH);write(154,HIGH);write(155,HIGH);write(169,HIGH);
delay(85);;
write(97,LOW);write(127,LOW);write(111,LOW);write(83,LOW);write(99,LOW);write(115,LOW);write(129,LOW);write(143,LOW);write(62,HIGH);write(48,HIGH);write(78,HIGH);write(50,HIGH);write(80,HIGH);write(94,HIGH);write(34,HIGH);write(66,HIGH);write(138,HIGH);write(152,HIGH);write(168,HIGH);write(140,HIGH);write(170,HIGH);write(184,HIGH);write(124,HIGH);write(156,HIGH);
delay(85);;
write(97,HIGH);write(127,HIGH);write(111,HIGH);write(83,HIGH);write(99,HIGH);write(115,HIGH);write(129,HIGH);write(143,HIGH);write(62,LOW);write(48,LOW);write(78,LOW);write(50,LOW);write(80,LOW);write(94,LOW);write(34,LOW);write(66,LOW);write(138,LOW);write(152,LOW);write(168,LOW);write(140,LOW);write(170,LOW);write(184,LOW);write(124,LOW);write(156,LOW);
delay(85);;
write(97,LOW);write(127,LOW);write(111,LOW);write(83,LOW);write(99,LOW);write(115,LOW);write(129,LOW);write(143,LOW);write(62,HIGH);write(48,HIGH);write(78,HIGH);write(50,HIGH);write(80,HIGH);write(94,HIGH);write(34,HIGH);write(66,HIGH);write(138,HIGH);write(152,HIGH);write(168,HIGH);write(140,HIGH);write(170,HIGH);write(184,HIGH);write(124,HIGH);write(156,HIGH);write(71,HIGH);write(57,HIGH);write(72,HIGH);write(87,HIGH);write(73,HIGH);write(69,HIGH);write(70,HIGH);write(55,HIGH);write(85,HIGH);write(41,HIGH);write(56,HIGH);write(86,HIGH);write(101,HIGH);write(161,HIGH);write(177,HIGH);write(162,HIGH);write(147,HIGH);write(163,HIGH);write(159,HIGH);write(160,HIGH);write(145,HIGH);write(175,HIGH);write(176,HIGH);write(191,HIGH);write(146,HIGH);write(131,HIGH);
delay(85);;
write(97,HIGH);write(127,HIGH);write(111,HIGH);write(83,HIGH);write(99,HIGH);write(115,HIGH);write(129,HIGH);write(143,HIGH);write(62,LOW);write(48,LOW);write(78,LOW);write(50,LOW);write(80,LOW);write(94,LOW);write(34,LOW);write(66,LOW);write(138,LOW);write(152,LOW);write(168,LOW);write(140,LOW);write(170,LOW);write(184,LOW);write(124,LOW);write(156,LOW);write(69,LOW);write(70,LOW);write(55,LOW);write(85,LOW);write(41,LOW);write(56,LOW);write(86,LOW);write(101,LOW);write(159,LOW);write(160,LOW);write(145,LOW);write(175,LOW);write(176,LOW);write(191,LOW);write(146,LOW);write(131,LOW);
delay(85);;
write(97,LOW);write(127,LOW);write(111,LOW);write(83,LOW);write(99,LOW);write(115,LOW);write(129,LOW);write(143,LOW);write(62,HIGH);write(48,HIGH);write(78,HIGH);write(50,HIGH);write(80,HIGH);write(94,HIGH);write(34,HIGH);write(66,HIGH);write(138,HIGH);write(152,HIGH);write(168,HIGH);write(140,HIGH);write(170,HIGH);write(184,HIGH);write(124,HIGH);write(156,HIGH);write(71,HIGH);write(57,HIGH);write(72,HIGH);write(87,HIGH);write(73,HIGH);write(69,HIGH);write(70,HIGH);write(55,HIGH);write(85,HIGH);write(41,HIGH);write(56,HIGH);write(86,HIGH);write(101,HIGH);write(161,HIGH);write(177,HIGH);write(162,HIGH);write(147,HIGH);write(163,HIGH);write(159,HIGH);write(160,HIGH);write(145,HIGH);write(175,HIGH);write(176,HIGH);write(191,HIGH);write(146,HIGH);write(131,HIGH);
delay(85);;
write(97,HIGH);write(127,HIGH);write(111,HIGH);write(83,HIGH);write(99,HIGH);write(115,HIGH);write(129,HIGH);write(143,HIGH);write(62,LOW);write(48,LOW);write(78,LOW);write(50,LOW);write(80,LOW);write(94,LOW);write(34,LOW);write(66,LOW);write(138,LOW);write(152,LOW);write(168,LOW);write(140,LOW);write(170,LOW);write(184,LOW);write(124,LOW);write(156,LOW);write(69,LOW);write(70,LOW);write(55,LOW);write(85,LOW);write(41,LOW);write(56,LOW);write(86,LOW);write(101,LOW);write(159,LOW);write(160,LOW);write(145,LOW);write(175,LOW);write(176,LOW);write(191,LOW);write(146,LOW);write(131,LOW);
delay(85);;
write(97,LOW);write(127,LOW);write(111,LOW);write(83,LOW);write(99,LOW);write(115,LOW);write(129,LOW);write(143,LOW);write(62,HIGH);write(48,HIGH);write(78,HIGH);write(50,HIGH);write(80,HIGH);write(94,HIGH);write(34,HIGH);write(66,HIGH);write(138,HIGH);write(152,HIGH);write(168,HIGH);write(140,HIGH);write(170,HIGH);write(184,HIGH);write(124,HIGH);write(156,HIGH);write(71,HIGH);write(57,HIGH);write(72,HIGH);write(87,HIGH);write(73,HIGH);write(69,HIGH);write(70,HIGH);write(55,HIGH);write(85,HIGH);write(41,HIGH);write(56,HIGH);write(86,HIGH);write(101,HIGH);write(161,HIGH);write(177,HIGH);write(162,HIGH);write(147,HIGH);write(163,HIGH);write(159,HIGH);write(160,HIGH);write(145,HIGH);write(175,HIGH);write(176,HIGH);write(191,HIGH);write(146,HIGH);write(131,HIGH);
delay(85);;
write(97,HIGH);write(127,HIGH);write(111,HIGH);write(83,HIGH);write(99,HIGH);write(115,HIGH);write(129,HIGH);write(143,HIGH);write(62,LOW);write(48,LOW);write(78,LOW);write(50,LOW);write(80,LOW);write(94,LOW);write(34,LOW);write(66,LOW);write(138,LOW);write(152,LOW);write(168,LOW);write(140,LOW);write(170,LOW);write(184,LOW);write(124,LOW);write(156,LOW);write(69,LOW);write(70,LOW);write(55,LOW);write(85,LOW);write(41,LOW);write(56,LOW);write(86,LOW);write(101,LOW);write(159,LOW);write(160,LOW);write(145,LOW);write(175,LOW);write(176,LOW);write(191,LOW);write(146,LOW);write(131,LOW);
delay(85);;
write(78,HIGH);
delay(85);;
write(93,HIGH);
delay(85);;
write(108,HIGH);
delay(85);;
write(123,HIGH);
delay(85);;
write(138,HIGH);
delay(85);;
write(156,HIGH);
delay(85);;
write(157,HIGH);
delay(85);;
write(158,HIGH);
delay(85);;
write(159,HIGH);
delay(85);;
write(160,HIGH);
delay(85);;
write(148,HIGH);
delay(85);;
write(133,HIGH);
delay(85);;
write(118,HIGH);
delay(85);;
write(103,HIGH);
delay(85);;
write(88,HIGH);
delay(85);;
write(70,HIGH);
delay(85);;
write(69,HIGH);
delay(85);;
write(68,HIGH);
delay(85);;
write(67,HIGH);
delay(85);;
write(66,HIGH);
delay(85);;
write(33,HIGH);write(183,HIGH);write(43,HIGH);write(193,HIGH);
delay(85);;
write(17,HIGH);write(197,HIGH);write(29,HIGH);write(209,HIGH);
delay(85);;
write(1,HIGH);write(211,HIGH);write(15,HIGH);write(225,HIGH);
delay(85);;
write(95,HIGH);write(125,HIGH);
delay(85);;
write(101,HIGH);write(131,HIGH);
delay(85);;
write(47,HIGH);write(167,HIGH);write(59,HIGH);write(179,HIGH);
delay(85);;
write(31,HIGH);write(181,HIGH);write(83,HIGH);write(143,HIGH);write(53,HIGH);write(173,HIGH);write(45,HIGH);write(195,HIGH);
delay(85);;
write(48,HIGH);write(168,HIGH);write(38,HIGH);write(188,HIGH);write(58,HIGH);write(178,HIGH);
delay(85);;
write(32,HIGH);write(182,HIGH);write(23,HIGH);write(203,HIGH);write(44,HIGH);write(194,HIGH);
delay(85);;
write(16,HIGH);write(196,HIGH);write(8,HIGH);write(218,HIGH);write(30,HIGH);write(210,HIGH);
delay(85);;
turnOn(All, sizeof(All) / sizeof(All[0]));
 }
void Pattern2(){
write(81,LOW);
delay(85);;
write(111,LOW);
delay(85);;
write(141,LOW);
delay(85);;
write(82,LOW);
delay(85);;
write(98,LOW);
delay(85);;
write(114,LOW);
delay(85);;
write(113,LOW);
delay(85);;
write(112,LOW);
delay(85);;
write(128,LOW);
delay(85);;
write(142,LOW); 
delay(85);;
write(114,HIGH);
delay(85);;
write(113,HIGH);
delay(85);;
write(128,HIGH);
delay(85);;
write(98,HIGH);
delay(85);;
write(142,HIGH); 
delay(85);;
write(112,HIGH);
delay(85);;
write(82,HIGH);
delay(85);;
write(141,HIGH);
delay(85);;
write(111,HIGH);
delay(85);;
write(81,HIGH);
delay(85);;
write(106,LOW);
delay(85);;
write(92,LOW);
delay(85);;
write(93,LOW);
delay(85);;
write(79,LOW);
delay(85);;
write(80,LOW);
delay(85);;
write(63,LOW);
delay(85);;
write(47,LOW);
delay(85);;
write(31,LOW);
delay(85);;
write(17,LOW);
delay(85);;
write(18,LOW);
delay(85);;
write(19,LOW);
delay(85);;
write(20,LOW);
delay(85);;
write(36,LOW);
delay(85);;
write(21,LOW);
delay(85);;
write(6,LOW);
delay(85);;
write(7,LOW);
delay(85);;
write(8,LOW);
delay(85);;
write(24,LOW);write(27,LOW);
delay(85);;
write(40,LOW);write(13,LOW);
delay(85);;
write(55,LOW);write(29,LOW);
delay(85);;
write(71,LOW);write(29,HIGH);
delay(85);;
write(86,LOW);write(13,HIGH);
delay(85);;
write(87,LOW);write(27,HIGH);
delay(85);;
write(102,LOW);
delay(85);;
write(103,LOW);
delay(85);;
write(118,LOW);
delay(85);;
write(119,LOW);
delay(85);;
write(133,LOW);
delay(85);;
write(132,LOW);
delay(85);;
write(147,LOW);
delay(85);;
write(146,LOW);
delay(85);;
write(161,LOW);
delay(85);;
write(175,LOW);
delay(85);;
write(190,LOW);write(207,LOW);
delay(85);;
write(204,LOW);write(223,LOW);
delay(85);;
write(218,LOW);write(209,LOW);
delay(85);;
write(217,LOW);write(209,HIGH);
delay(85);;
write(216,LOW);write(223,HIGH);
delay(85);;
write(201,LOW);write(207,HIGH);
delay(85);;
write(186,LOW);
delay(85);;
write(200,LOW);
delay(85);;
write(199,LOW);
delay(85);;
write(198,LOW);
delay(85);;
write(197,LOW);
delay(85);;
write(181,LOW);
delay(85);;
write(167,LOW);
delay(85);;
write(153,LOW);
delay(85);;
write(139,LOW);
delay(85);;
write(140,LOW);
delay(85);;
write(123,LOW);
delay(85);;
write(122,LOW);
delay(85);;
write(31,HIGH);write(106,HIGH);write(181,HIGH);
delay(85);;
write(17,HIGH);write(47,HIGH);write(92,HIGH);write(122,HIGH);write(167,HIGH);write(197,HIGH);
delay(85);;
write(18,HIGH);write(63,HIGH);write(93,HIGH);write(123,HIGH);write(153,HIGH);write(198,HIGH);
delay(85);;
write(19,HIGH);write(79,HIGH);write(139,HIGH);write(199,HIGH);
delay(85);;
write(20,HIGH);write(80,HIGH);write(140,HIGH);write(200,HIGH);
delay(85);;
write(6,HIGH);write(21,HIGH);write(36,HIGH);write(186,HIGH);write(201,HIGH);write(216,HIGH);
delay(85);;
write(7,HIGH);write(217,HIGH);
delay(85);;
write(8,HIGH);write(218,HIGH);
delay(85);;
write(24,HIGH);write(204,HIGH);
delay(85);;
write(40,HIGH);write(55,HIGH);write(175,HIGH);write(190,HIGH);
delay(85);;
write(71,HIGH);write(86,HIGH);write(146,HIGH);write(161,HIGH);
delay(85);;
write(87,HIGH);write(102,HIGH);write(132,HIGH);write(147,HIGH);
delay(85);;
write(103,HIGH);write(118,HIGH);write(133,HIGH);
delay(85);;
write(119,HIGH);write(1,LOW);write(2,LOW);write(3,LOW);write(4,LOW);write(5,LOW);write(9,LOW);write(10,LOW);write(11,LOW);write(12,LOW);write(13,LOW);write(14,LOW);write(15,LOW);
delay(85);;
write(16,LOW);write(25,LOW);write(26,LOW);write(27,LOW);write(28,LOW);write(29,LOW);write(30,LOW);
delay(85);;
write(41,LOW);write(42,LOW);write(43,LOW);write(44,LOW);write(45,LOW);
delay(85);;
write(46,LOW);write(56,LOW);write(57,LOW);write(58,LOW);write(59,LOW);write(60,LOW);
delay(85);;
write(61,LOW);write(62,LOW);write(72,LOW);write(73,LOW);write(74,LOW);write(75,LOW);
delay(85);;
write(76,LOW);write(77,LOW);write(78,LOW);write(88,LOW);write(89,LOW);write(90,LOW);
delay(85);;
write(91,LOW);write(104,LOW);write(105,LOW);
delay(85);;
write(120,LOW);
delay(85);;
write(121,LOW);write(134,LOW);write(135,LOW);
delay(85);;
write(136,LOW);write(137,LOW);write(138,LOW);write(148,LOW);write(149,LOW);write(150,LOW);
delay(85);;
write(151,LOW);write(152,LOW);write(162,LOW);write(163,LOW);write(164,LOW);write(165,LOW);
delay(85);;
write(166,LOW);write(176,LOW);write(177,LOW);write(178,LOW);write(179,LOW);write(180,LOW);
delay(85);;
write(191,LOW);write(192,LOW);write(193,LOW);write(194,LOW);write(195,LOW);
delay(85);;
write(196,LOW);write(205,LOW);write(206,LOW);write(207,LOW);write(208,LOW);write(209,LOW);write(210,LOW);
delay(85);;
write(211,LOW);write(212,LOW);write(213,LOW);write(214,LOW);write(215,LOW);write(219,LOW);write(220,LOW);write(221,LOW);write(222,LOW);write(223,LOW);write(224,LOW);write(225,LOW);
delay(85);;
write(15,HIGH);write(30,HIGH);write(45,HIGH);write(60,HIGH);write(75,HIGH);write(90,HIGH);write(105,HIGH);write(120,HIGH);write(135,HIGH);write(150,HIGH);write(165,HIGH);write(180,HIGH);write(195,HIGH);write(210,HIGH);write(225,HIGH);
delay(85);;
write(104,HIGH);write(134,HIGH);
delay(85);;
write(14,HIGH);write(29,HIGH);write(44,HIGH);write(59,HIGH);write(74,HIGH);write(89,HIGH);write(149,HIGH);write(164,HIGH);write(179,HIGH);write(194,HIGH);write(209,HIGH);write(224,HIGH);
delay(85);;
write(13,HIGH);write(223,HIGH);
delay(85);;
write(27,HIGH);write(207,HIGH);
delay(85);;
write(28,HIGH);write(43,HIGH);write(58,HIGH);write(73,HIGH);write(88,HIGH);write(148,HIGH);write(163,HIGH);write(178,HIGH);write(193,HIGH);write(208,HIGH);
delay(85);;
write(57,HIGH);write(72,HIGH);write(162,HIGH);write(177,HIGH);
delay(85);;
write(41,HIGH);write(56,HIGH);write(176,HIGH);write(191,HIGH);
delay(85);;
write(25,HIGH);write(205,HIGH);
delay(85);;
write(9,HIGH);write(219,HIGH);
delay(85);;
write(12,HIGH);write(42,HIGH);write(192,HIGH);write(222,HIGH);
delay(85);;
write(11,HIGH);write(26,HIGH);write(206,HIGH);write(221,HIGH);
delay(85);;
write(10,HIGH);write(220,HIGH);
delay(85);;
write(215,HIGH);
delay(85);;
write(214,HIGH);
delay(85);;
write(213,HIGH);
delay(85);;
write(212,HIGH);
delay(85);;
write(211,HIGH);
delay(85);;
write(196,HIGH);
delay(85);;
write(166,HIGH);
delay(85);;
write(151,HIGH);
delay(85);;
write(152,HIGH);
delay(85);;
write(136,HIGH);
delay(85);;
write(137,HIGH);
delay(85);;
write(138,HIGH);
delay(85);;
write(121,HIGH);
delay(85);;
write(91,HIGH);
delay(85);;
write(76,HIGH);
delay(85);;
write(77,HIGH);
delay(85);;
write(78,HIGH);
delay(85);;
write(61,HIGH);
delay(85);;
write(62,HIGH);
delay(85);;
write(46,HIGH);
delay(85);;
write(16,HIGH);
delay(85);;
write(1,HIGH);
delay(85);;
write(2,HIGH);
delay(85);;
write(3,HIGH);
delay(85);;
write(4,HIGH);
delay(85);;
write(5,HIGH);
delay(85);;
write(81,LOW);
delay(85);;
write(111,LOW);
delay(85);;
write(141,LOW);
delay(85);;
write(82,LOW);
delay(85);;
write(112,LOW);
delay(85);;
write(142,LOW);
delay(85);;
write(98,LOW);
delay(85);;
write(128,LOW);
delay(85);;
write(113,LOW);
delay(85);;
write(114,LOW);
delay(85);;
write(114,HIGH);
delay(85);;
write(98,HIGH);
delay(85);;
write(113,HIGH);
delay(85);;
write(128,HIGH);
delay(85);;
write(82,HIGH);
delay(85);;
write(112,HIGH);
delay(85);;
write(142,HIGH);
delay(85);;
write(81,HIGH);
delay(85);;
write(111,HIGH);
delay(85);;
write(141,HIGH);
delay(85);;
write(96,LOW);write(97,LOW);write(82,LOW);write(126,LOW);write(127,LOW);write(142,LOW);write(84,LOW);write(99,LOW);write(100,LOW);write(130,LOW);write(129,LOW);write(144,LOW);
delay(85);;
write(64,LOW);write(65,LOW);write(50,LOW);write(154,LOW);write(155,LOW);write(170,LOW);write(56,LOW);write(71,LOW);write(72,LOW);write(176,LOW);write(161,LOW);write(162,LOW);
delay(85);;
write(32,LOW);write(33,LOW);write(18,LOW);write(182,LOW);write(183,LOW);write(198,LOW);write(28,LOW);write(43,LOW);write(44,LOW);write(208,LOW);write(193,LOW);write(194,LOW);
delay(85);;
write(1,LOW);write(15,LOW);write(225,LOW);write(211,LOW);
delay(85);;
write(96,HIGH);write(97,HIGH);write(82,HIGH);write(126,HIGH);write(127,HIGH);write(142,HIGH);write(84,HIGH);write(99,HIGH);write(100,HIGH);write(130,HIGH);write(129,HIGH);write(144,HIGH);
delay(85);;
write(64,HIGH);write(65,HIGH);write(50,HIGH);write(154,HIGH);write(155,HIGH);write(170,HIGH);write(56,HIGH);write(71,HIGH);write(72,HIGH);write(176,HIGH);write(161,HIGH);write(162,HIGH);
delay(85);;
write(32,HIGH);write(33,HIGH);write(18,HIGH);write(182,HIGH);write(183,HIGH);write(198,HIGH);write(28,HIGH);write(43,HIGH);write(44,HIGH);write(208,HIGH);write(193,HIGH);write(194,HIGH);
delay(85);;
write(1,HIGH);write(15,HIGH);write(225,HIGH);write(211,HIGH);
delay(85);;
write(114,LOW);
delay(85);;
write(98,LOW);
delay(85);;
write(113,LOW);
delay(85);;
write(128,LOW);
delay(85);;
write(82,LOW);
delay(85);;
write(112,LOW);
delay(85);;
write(142,LOW);
delay(85);;
write(81,LOW);
delay(85);;
write(111,LOW);
delay(85);;
write(141,LOW);
delay(85);;
write(81,HIGH);
delay(85);;
write(111,HIGH);
delay(85);;
write(141,HIGH);
delay(85);;
write(82,HIGH);
delay(85);;
write(112,HIGH);
delay(85);;
write(142,HIGH);
delay(85);;
write(98,HIGH);
delay(85);;
write(113,HIGH);
delay(85);;
write(128,HIGH);
delay(85);;
write(114,HIGH);
delay(85);;
turnOff(Petal1, sizeof(Petal1) / sizeof(Petal1[0]));
delay(150);
turnOn(Petal1, sizeof(Petal1) / sizeof(Petal1[0]));
delay(150);
turnOff(Petal2, sizeof(Petal2) / sizeof(Petal2[0]));
delay(150);
turnOn(Petal2, sizeof(Petal2) / sizeof(Petal2[0]));
delay(150);
turnOff(Petal3, sizeof(Petal3) / sizeof(Petal3[0]));
delay(150);
turnOn(Petal3, sizeof(Petal3) / sizeof(Petal3[0]));
delay(150);
turnOff(Petal6, sizeof(Petal6) / sizeof(Petal6[0]));
delay(150);
turnOn(Petal6, sizeof(Petal6) / sizeof(Petal6[0]));
delay(150);
turnOff(Petal5, sizeof(Petal5) / sizeof(Petal5[0]));
delay(150);
turnOn(Petal5, sizeof(Petal5) / sizeof(Petal5[0]));
delay(150);
turnOff(Petal4, sizeof(Petal4) / sizeof(Petal4[0]));
delay(150);
turnOn(Petal4, sizeof(Petal4) / sizeof(Petal4[0]));
delay(150);
write(31,LOW);write(106,LOW);write(181,LOW);
delay(85);;
write(17,LOW);write(47,LOW);write(92,LOW);write(122,LOW);write(167,LOW);write(197,LOW);
delay(85);;
write(18,LOW);write(63,LOW);write(93,LOW);write(123,LOW);write(153,LOW);write(198,LOW);
delay(85);;
write(19,LOW);write(79,LOW);write(139,LOW);write(199,LOW);
delay(85);;
write(20,LOW);write(80,LOW);write(140,LOW);write(200,LOW);
delay(85);;
write(6,LOW);write(21,LOW);write(36,LOW);write(66,LOW);write(156,LOW);write(186,LOW);write(201,LOW);write(216,LOW);
delay(85);;
write(7,LOW);write(52,LOW);write(67,LOW);write(157,LOW);write(172,LOW);write(217,LOW);
delay(85);;
write(8,LOW);write(83,LOW);write(143,LOW);write(218,LOW);
delay(85);;
write(24,LOW);write(99,LOW);write(129,LOW);write(204,LOW);
delay(85);;
write(40,LOW);write(55,LOW);write(100,LOW);write(115,LOW);write(130,LOW);write(175,LOW);write(190,LOW);
delay(85);;
write(71,LOW);write(86,LOW);write(146,LOW);write(161,LOW);
delay(85);;
write(87,LOW);write(102,LOW);write(132,LOW);write(147,LOW);
delay(85);;
write(103,LOW);write(118,LOW);write(133,LOW);
delay(85);;
write(119,LOW);
delay(85);;
turnOn(All, sizeof(All) / sizeof(All[0]));
write(81,LOW);
delay(85);;
write(111,LOW);
delay(85);;
write(141,LOW);
delay(85);;
write(82,LOW);
delay(85);;
write(98,LOW);
delay(85);;
write(114,LOW);
delay(85);;
write(113,LOW);
delay(85);;
write(112,LOW);
delay(85);;
write(128,LOW);
delay(85);;
write(142,LOW); 
delay(85);;
write(114,HIGH);
delay(85);;
write(113,HIGH);
delay(85);;
write(128,HIGH);
delay(85);;
write(98,HIGH);
delay(85);;
write(142,HIGH);
delay(85);;
write(112,HIGH);
delay(85);;
write(82,HIGH);
delay(85);;
write(141,HIGH);
delay(85);;
write(111,HIGH);
delay(85);;
write(81,HIGH);
delay(85);;
}