LT-5016M1を74HC595で制御します。文字スクロールなどの参考にどうぞ。

Dependencies:   mbed

制作の過程はNotebookに書いています。

Revision:
39:f9a450e32abb
Parent:
38:97031cb65085
Child:
40:39e626b5269d
diff -r 97031cb65085 -r f9a450e32abb main.cpp
--- a/main.cpp	Thu Mar 23 10:09:10 2017 +0000
+++ b/main.cpp	Thu Mar 23 11:33:19 2017 +0000
@@ -6,31 +6,13 @@
 DigitalOut CLK(D7); // 74164
 DigitalIn BUTTON(USER_BUTTON); // 点灯・消灯ボタン
 //Serial pc(USBTX, USBRX); // USBシリアル通信
-//Timer timer; // 経過時間のカウンター
+Timer timer; // 経過時間のカウンター
 const unsigned char HI = 0;
 const unsigned char LO = 1;
 const unsigned char MODE = 2; //SPI
 
 // 点灯パターン 手前赤、手前緑...
-unsigned short pattern1[16][2*11] =
-{{0,16,0,8,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1028,0,0},
- {0,240,7,200,63,0,0,0,0,0,0,0,0,0,63736,3855,57568,771,3598,514,0,0},
- {0,8,2,4,0,0,49344,49344,257,32896,57825,3855,0,0,2056,2056,4112,1028,4369,514,0,0},
- {0,4,17,18,0,0,41120,8224,514,16448,8738,0,0,0,2056,2056,2056,2056,4369,257,0,0},
- {0,254,63,17,0,0,32896,4112,1028,8224,9252,0,0,0,2056,1028,6168,2056,4369,257,0,0},
- {0,1,16,8,64,0,32896,0,1028,8224,9252,0,0,0,0,1028,0,2056,37265,0,0,0},
- {0,0,16,232,127,0,32896,0,33924,8481,42148,771,0,0,0,514,0,1028,37265,0,0,0},
- {0,252,31,4,8,0,32896,0,33410,8481,25700,1028,0,0,0,514,0,514,20046,0,0,0},
- {0,0,16,4,8,0,32896,32896,257,8224,1028,2056,0,0,0,514,0,257,16448,7196,0,0},
- {0,0,16,6,8,0,32896,0,514,8224,1028,2056,0,0,0,257,32896,0,8224,8738,0,0},
- {0,252,31,5,8,0,32896,0,1028,8224,1028,2056,0,0,0,257,16448,0,8224,8738,0,0},
- {0,128,16,4,8,0,32896,0,1028,8224,1028,2056,0,0,0,257,8224,4112,4112,8738,0,0},
- {0,36,33,4,8,0,32896,4112,33924,8481,9252,2056,0,0,32896,0,4112,4112,4112,8738,0,0},
- {0,36,73,4,8,0,32896,8224,33410,16705,16962,1028,0,0,32896,0,63736,7967,2056,8738,0,0},
- {0,34,72,4,8,0,57568,50115,257,32896,33153,771,0,0,32896,0,0,0,2056,7196,0,0},
- {0,193,15,4,15,0,0,0,0,0,0,0,0,0,0,0,0,0,1028,0,0,0}};
- 
- unsigned char pattern2[16][32*11/8] = // 急行13:05やや混雑
+const unsigned char pattern2[16][32*11/8] = // 急行13:05やや混雑
 {{0,0,16,0,0,0,8,0,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,64,0,0,64,64,0,0,2,2,32,32,8,8,18,18,0,0},
  {0,0,240,0,7,0,200,0,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,0,0,128,128,0,0,228,228,63,63,8,8,18,18,0,0},
  {0,0,8,0,2,0,4,0,0,0,0,0,192,192,192,192,1,1,128,128,225,225,15,15,0,0,12,12,1,1,12,12,1,1,40,40,32,32,31,31,73,73,0,0},
@@ -47,57 +29,137 @@
  {0,0,36,0,73,0,4,0,8,0,0,0,128,128,32,32,130,130,65,65,66,66,4,4,0,0,128,128,0,0,128,128,0,0,34,34,68,68,74,74,9,9,0,0},
  {0,0,34,0,72,0,4,0,8,0,0,0,224,224,195,195,1,1,128,128,129,129,3,3,0,0,0,0,1,1,0,0,1,1,226,226,69,69,9,9,73,73,0,0},
  {0,0,193,0,15,0,4,0,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,1,58,58,120,120,8,8,127,127,0,0}};
+ 
+const unsigned char pattern3[16][4*166] = //グリーンぽけっとのご案内
+{{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,0,128,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,9,9,2,2,24,24,0,0,0,0,0,0,0,0,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,2,2,0,0,0,0,128,128,0,0,64,64,0,0,0,0,0,0,66,66,0,0,64,64,0,0,64,64,0,0,0,0,0,0,4,4,16,16,0,0,0,0,8,8,0,0,128,128,0,0,0,0,0,0,130,130,0,0,128,128,0,0,64,64,0,0,0,0,0,0,0,32,0,0,0,0,0,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,0,0,8,8,32,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,1,1,0,0,0,0,0,0,0,0,0,0,64,0,128,0,0,0,0,0,0,0,224,224,0,0,16,16,64,64,0,0,0,0,0,0,0,0,73,73,64,64,0,0,0,0,32,32,0,0,48,48,56,56,8,8,8,8,128,128,0,0,0,0,0,0,136,136,8,8,0,0,0,0,128,128,0,0,0,0,4,4,136,136,8,8,0,0,0,0,0,0,0,0,0,0,1,0,128,0,0,0,0,0,0,0,128,128,0,0,0,0,32,32,16,16,64,64,0,0,0,0,0,0,96,96,8,8,36,36,0,0,0,0,8,8,1,1,8,8,32,32,0,0,32,32,0,0,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,64,0,0,16,16,64,64,73,73,64,64,64,64,0,0,0,0,64,64,0,0,0,0,128,128,0,0,96,96,8,8,128,128,0,0,8,8,4,4,0,0,32,32,0,0,32,32,0,0,0,0,132,132,8,8,136,136,8,8,0,0,32,32,30,30,32,32,4,4,66,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,4,4,0,0,0,0,0,0,0,0,0,0,48,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,64,0,0,192,192,0,0,64,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,0,0,0,0,0,0,64,64,0,0,0,0,0,0,0,0,0,0,1,1,96,96,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
+ {128,0,0,0,128,0,0,0,128,0,0,0,0,96,0,72,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,72,0,0,0,12,0,0,0,0,0,24,0,0,0,0,0,0,0,0,0,72,0,255,0,127,0,128,0,0,128,0,0,0,128,0,0,0,128,0,0,0,0,0,0,0,8,8,73,73,4,4,7,7,0,0,0,0,0,0,0,0,208,208,63,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,34,34,0,0,0,0,128,128,0,0,56,56,0,0,0,0,0,0,68,68,64,64,64,64,36,36,64,64,8,8,0,0,0,0,132,132,63,63,254,254,127,127,8,8,126,126,128,128,0,0,0,0,0,0,132,132,124,124,128,128,64,64,64,64,0,0,0,0,0,0,0,32,0,4,0,96,0,72,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,72,0,0,0,12,0,0,0,0,0,24,0,0,0,0,0,0,0,0,6,6,129,129,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,64,0,0,0,0,0,192,192,0,0,200,200,63,63,0,0,0,0,0,0,0,0,48,48,0,0,8,8,4,4,128,128,1,1,0,0,1,1,0,0,0,0,0,0,0,0,62,0,127,0,128,0,64,0,0,0,0,0,31,31,124,124,240,240,127,127,4,4,0,0,0,0,31,31,202,202,127,127,0,0,0,0,32,32,4,4,140,140,7,7,16,16,8,8,128,128,64,64,8,8,4,4,144,144,8,8,0,0,0,0,128,128,64,64,248,248,15,15,144,144,8,8,0,0,0,0,0,0,0,0,255,0,1,0,129,0,0,0,0,0,0,0,128,128,0,0,127,127,127,127,240,240,127,127,0,0,0,0,254,254,32,32,40,40,68,68,0,0,0,0,8,8,65,65,200,200,63,63,252,252,127,127,248,248,15,15,0,0,0,0,0,0,0,0,96,96,0,0,0,0,0,0,0,0,0,0,64,64,8,8,16,16,64,64,202,202,127,127,56,56,0,0,254,254,65,65,0,0,0,0,128,128,0,0,30,30,8,8,128,128,32,32,136,136,4,4,191,191,127,127,127,127,24,24,0,0,0,0,132,132,68,68,136,136,72,72,254,254,63,63,0,0,24,24,124,124,126,126,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,4,4,0,0,0,0,0,0,0,0,0,0,72,72,0,0,0,0,0,0,0,0,248,248,63,63,0,0,1,1,248,248,60,60,192,192,0,0,0,0,144,144,112,112,64,64,248,248,255,255,0,0,0,0,96,96,0,0,96,96,64,64,0,0,24,24,0,0,3,3,0,0,2,2,0,0,0,0,0,0,148,148,0,0,8,8,96,96,0,0,0,0,1,1,64,64,0,0,254,254,255,255,16,16,8,8,0,0,128,128,192,192,0,0,0,0,0,0,0,0,0,0},
+ {192,0,1,0,192,0,1,0,192,0,1,0,0,64,0,80,0,24,0,8,0,0,0,0,0,0,0,0,0,2,0,79,0,2,0,8,0,0,0,0,0,32,0,0,0,192,0,3,0,0,0,80,0,65,0,64,0,128,0,32,192,0,1,0,192,0,1,0,192,0,1,0,0,0,0,0,200,200,127,127,200,200,0,0,0,0,0,0,0,0,16,16,72,72,16,16,8,8,32,32,0,0,0,0,0,0,16,16,0,0,0,0,196,196,63,63,0,0,0,0,128,128,0,0,15,15,32,32,0,0,0,0,200,200,127,127,252,252,23,23,192,192,31,31,0,0,0,0,18,18,16,16,130,130,64,64,190,190,66,66,128,128,64,64,0,0,0,0,136,136,68,68,255,255,127,127,32,32,4,4,192,192,3,3,0,240,0,15,0,64,0,80,0,24,0,8,0,0,0,0,0,0,0,0,0,2,0,79,0,2,0,8,0,0,0,0,0,32,0,0,0,0,63,63,2,2,4,4,130,130,0,0,192,192,3,3,24,0,4,0,0,0,0,0,12,0,72,0,0,0,4,0,128,128,0,0,4,4,0,0,0,0,0,0,0,0,63,63,32,32,16,16,16,16,8,8,0,0,1,1,0,0,1,1,0,0,0,0,0,0,0,0,34,0,1,0,255,0,127,0,0,0,0,0,16,16,68,68,8,8,2,2,132,132,127,127,254,254,0,0,42,42,4,4,0,0,0,0,240,240,15,15,11,11,68,68,16,16,68,68,255,255,127,127,16,16,8,8,144,144,36,36,0,0,0,0,255,255,127,127,8,8,4,4,144,144,36,36,0,0,0,0,0,0,0,0,68,0,32,0,130,0,0,0,0,0,0,0,254,254,63,63,20,20,32,32,8,8,2,2,0,0,0,0,128,128,32,32,62,62,68,68,0,0,0,0,8,8,127,127,4,4,0,0,132,132,32,32,8,8,4,4,24,24,0,0,0,0,0,0,64,64,8,8,0,0,3,3,0,0,0,0,192,192,31,31,255,255,69,69,42,42,4,4,7,7,127,127,2,2,73,73,0,0,0,0,64,64,16,16,16,16,8,8,254,254,63,63,190,190,66,66,34,34,34,34,0,0,7,7,0,0,0,0,196,196,127,127,255,255,127,127,128,128,0,0,128,128,7,7,10,10,5,5,0,0,0,0,0,0,0,0,0,0,0,0,192,192,3,3,72,72,36,36,2,2,0,0,0,0,0,0,12,12,72,72,0,0,0,0,0,0,0,0,32,32,32,32,128,128,2,2,32,32,8,8,128,128,0,0,0,0,160,160,30,30,68,68,8,8,65,65,0,0,0,0,64,64,0,0,64,64,144,144,4,4,16,16,0,0,2,2,0,0,2,2,0,0,0,0,48,48,168,168,196,196,8,8,64,64,32,32,0,0,65,65,64,64,28,28,2,2,128,128,32,32,16,16,254,254,255,255,128,128,16,16,0,0,0,0,0,0,0,0},
+ {204,0,25,0,204,0,25,0,204,0,25,0,0,192,0,63,0,16,0,8,0,0,0,0,0,4,0,0,0,196,0,52,0,4,0,8,0,0,0,0,0,32,0,4,0,176,0,12,0,8,0,22,0,32,0,32,0,254,0,127,204,0,25,0,204,0,25,0,204,0,25,0,0,0,0,0,8,8,9,9,64,64,0,0,0,0,0,0,252,252,31,31,72,72,16,16,8,8,33,33,0,0,0,0,252,252,31,31,32,32,16,16,132,132,8,8,0,0,0,0,128,128,0,0,8,8,127,127,0,0,0,0,32,32,0,0,64,64,8,8,32,32,8,8,0,0,0,0,17,17,16,16,242,242,79,79,136,136,66,66,255,255,127,127,0,0,0,0,128,128,68,68,128,128,0,0,32,32,8,8,176,176,12,12,0,16,0,4,0,192,0,63,0,16,0,8,0,0,0,0,0,4,0,0,0,196,0,52,0,4,0,8,0,0,0,0,0,32,0,4,241,241,2,2,4,4,4,4,68,68,32,32,176,176,12,12,16,0,4,0,0,0,0,0,8,0,16,0,252,0,15,0,68,68,6,6,18,18,0,0,0,0,0,0,241,241,2,2,32,32,35,35,16,16,8,8,2,2,63,63,225,225,127,127,0,0,0,0,0,0,0,0,34,0,1,0,128,0,0,0,0,0,0,0,16,16,68,68,8,8,34,34,4,4,68,68,128,128,0,0,127,127,63,63,0,0,0,0,16,16,4,4,200,200,127,127,255,255,127,127,128,128,0,0,16,16,8,8,254,254,63,63,0,0,0,0,8,8,8,8,8,8,4,4,254,254,63,63,0,0,0,0,0,0,0,0,68,0,127,0,68,0,32,0,0,0,0,0,2,2,32,32,20,20,32,32,8,8,34,34,0,0,0,0,128,128,32,32,136,136,127,127,0,0,0,0,191,191,8,8,18,18,0,0,132,132,32,32,8,8,4,4,16,16,0,0,4,4,0,0,192,192,31,31,24,24,2,2,0,0,0,0,32,32,8,8,16,16,68,68,127,127,63,63,1,1,65,65,2,2,73,73,0,0,0,0,252,252,63,63,255,255,9,9,128,128,0,0,72,72,126,126,36,36,36,36,0,0,1,1,0,0,0,0,100,100,4,4,136,136,8,8,255,255,127,127,63,63,4,4,145,145,8,8,0,0,0,0,0,0,0,0,8,8,6,6,176,176,12,12,72,72,116,116,4,4,31,31,0,0,16,16,8,8,48,48,0,0,0,0,0,0,0,0,32,32,32,32,128,128,2,2,64,64,4,4,132,132,0,0,16,16,44,44,16,16,68,68,8,8,65,65,2,2,0,0,64,64,12,12,64,64,166,166,8,8,16,16,4,4,126,126,194,194,255,255,0,0,0,0,32,32,40,40,88,88,16,16,64,64,70,70,252,252,127,127,194,194,3,3,2,2,145,145,32,32,16,16,0,0,1,1,0,0,13,13,2,2,0,0,0,0,0,0},
+ {142,0,56,0,142,0,56,0,142,0,56,0,0,32,0,16,0,16,0,8,0,0,0,0,0,8,0,32,0,4,0,4,0,36,0,120,0,0,0,0,0,32,0,8,0,136,0,16,0,240,0,13,0,255,0,127,0,130,0,32,142,0,56,0,142,0,56,0,142,0,56,0,0,0,0,0,63,63,73,73,65,65,64,64,0,0,0,0,0,0,0,0,68,68,16,16,8,8,33,33,0,0,0,0,0,0,0,0,66,66,32,32,31,31,69,69,0,0,0,0,128,128,64,64,8,8,33,33,0,0,0,0,33,33,0,0,64,64,4,4,16,16,4,4,0,0,0,0,138,138,31,31,130,130,64,64,72,72,34,34,128,128,0,0,0,0,0,0,241,241,71,71,128,128,32,32,16,16,16,16,136,136,16,16,0,40,0,2,0,32,0,16,0,16,0,8,0,0,0,0,0,8,0,32,0,4,0,4,0,36,0,120,0,0,0,0,0,32,0,8,14,14,1,1,36,36,124,124,192,192,127,127,136,136,16,16,16,0,68,0,0,0,0,0,8,0,24,0,0,0,4,0,248,248,1,1,17,17,0,0,0,0,0,0,14,14,1,1,226,226,64,64,16,16,8,8,252,252,1,1,30,30,1,1,0,0,0,0,0,0,0,0,62,0,33,0,128,0,16,0,0,0,0,0,255,255,37,37,228,228,127,127,100,100,68,68,128,128,0,0,12,12,33,33,0,0,0,0,40,40,2,2,8,8,4,4,0,0,0,0,128,128,16,16,16,16,8,8,64,64,1,1,0,0,0,0,16,16,4,4,8,8,4,4,64,64,1,1,0,0,0,0,0,0,0,0,68,0,32,0,192,0,127,0,0,0,0,0,2,2,32,32,20,20,32,32,228,228,127,127,0,0,0,0,128,128,32,32,136,136,4,4,0,0,0,0,132,132,8,8,17,17,0,0,132,132,32,32,8,8,4,4,16,16,0,0,8,8,32,32,32,32,8,8,16,16,2,2,0,0,0,0,16,16,4,4,16,16,68,68,12,12,33,33,1,1,65,65,254,254,73,73,0,0,0,0,4,4,16,16,16,16,126,126,252,252,31,31,40,40,17,17,48,48,48,48,62,62,1,1,0,0,0,0,223,223,63,63,136,136,8,8,129,129,64,64,0,0,4,4,128,128,16,16,0,0,0,0,0,0,0,0,240,240,13,13,136,136,16,16,68,68,44,44,196,196,0,0,252,252,63,63,8,8,8,8,0,0,0,0,0,0,0,0,32,32,32,32,64,64,4,4,64,64,4,4,248,248,7,7,224,224,27,27,16,16,68,68,8,8,65,65,4,4,8,8,196,196,3,3,196,196,33,33,72,72,240,240,248,248,3,3,60,60,2,2,0,0,0,0,32,32,248,248,32,32,16,16,196,196,129,129,0,0,0,0,60,60,0,0,248,248,63,63,32,32,16,16,0,0,1,1,132,132,3,3,4,4,8,8,0,0,0,0},
+ {148,0,20,0,148,0,20,0,148,0,20,0,0,32,0,16,0,16,0,8,0,0,0,0,0,16,0,32,0,4,0,4,0,196,0,15,0,0,0,3,0,32,0,12,0,132,0,16,0,0,0,2,0,8,0,4,0,130,0,32,148,0,20,0,148,0,20,0,148,0,20,0,0,0,0,0,200,200,127,127,194,194,127,127,0,0,0,0,0,0,0,0,196,196,31,31,8,8,33,33,0,0,0,0,0,0,0,0,132,132,32,32,228,228,127,127,0,0,0,0,255,255,127,127,127,127,33,33,0,0,0,0,210,210,63,63,64,64,66,66,24,24,4,4,0,0,0,0,4,4,16,16,250,250,95,95,40,40,34,34,128,128,0,0,0,0,0,0,130,130,124,124,254,254,127,127,8,8,63,63,132,132,16,16,0,68,0,1,0,32,0,16,0,16,0,8,0,0,0,0,0,16,0,32,0,4,0,4,0,196,0,15,0,0,0,3,0,32,0,12,128,128,32,32,196,196,7,7,72,72,34,34,132,132,16,16,240,0,127,0,0,0,0,0,8,0,6,0,0,0,4,0,32,32,16,16,8,8,64,64,0,0,3,3,128,128,0,0,60,60,64,64,8,8,8,8,0,0,1,1,0,0,1,1,0,0,0,0,0,0,0,0,34,0,127,0,252,0,31,0,0,0,0,0,146,146,36,36,36,36,34,34,28,28,68,68,128,128,32,32,26,26,33,33,0,0,0,0,68,68,1,1,191,191,63,63,0,0,0,0,252,252,31,31,8,8,8,8,64,64,2,2,0,0,0,0,254,254,63,63,248,248,7,7,64,64,2,2,0,0,0,0,0,0,0,0,124,0,32,0,72,0,34,0,0,0,0,0,0,0,15,15,127,127,32,32,36,36,34,34,0,0,0,0,252,252,32,32,168,168,68,68,0,0,0,0,68,68,4,4,8,8,64,64,252,252,63,63,248,248,7,7,16,16,32,32,16,16,32,32,32,32,8,8,16,16,2,2,0,0,0,0,24,24,4,4,254,254,68,68,26,26,33,33,1,1,65,65,34,34,72,72,0,0,0,0,4,4,16,16,254,254,72,72,132,132,16,16,127,127,17,17,44,44,44,44,34,34,65,65,0,0,0,0,68,68,4,4,248,248,15,15,189,189,94,94,0,0,68,68,252,252,31,31,0,0,0,0,0,0,0,0,0,0,2,2,132,132,16,16,68,68,39,39,4,4,0,0,0,0,16,16,8,8,6,6,0,0,0,0,0,0,0,0,32,32,4,4,64,64,4,4,128,128,2,2,128,128,0,0,0,0,4,4,254,254,68,68,248,248,127,127,4,4,16,16,56,56,0,0,56,56,0,0,136,136,31,31,0,0,2,2,0,0,2,2,0,0,0,0,226,226,15,15,32,32,32,32,120,120,128,128,0,0,16,16,32,32,0,0,128,128,2,2,16,16,16,16,0,0,1,1,120,120,2,2,4,4,16,16,0,0,0,0},
+ {160,0,2,0,160,0,2,0,160,0,2,0,0,16,0,16,0,16,0,8,0,2,0,16,0,16,0,16,0,68,0,124,0,4,0,8,0,224,0,12,0,32,0,3,0,132,0,32,0,0,0,1,0,60,0,2,0,66,0,33,160,0,2,0,160,0,2,0,160,0,2,0,0,0,0,0,8,8,4,4,72,72,8,8,0,0,0,0,0,0,0,0,6,6,0,0,8,8,33,33,0,0,0,0,0,0,0,0,136,136,16,16,4,4,0,0,0,0,0,0,64,64,1,1,8,8,33,33,0,0,0,0,64,64,34,34,255,255,127,127,38,38,2,2,0,0,0,0,18,18,80,80,2,2,64,64,255,255,18,18,128,128,16,16,0,0,0,0,136,136,68,68,18,18,34,34,255,255,64,64,132,132,32,32,0,130,0,1,0,16,0,16,0,16,0,8,0,2,0,16,0,16,0,16,0,68,0,124,0,4,0,8,0,224,0,12,0,32,0,3,64,64,72,72,2,2,4,4,40,40,18,18,132,132,32,32,31,0,4,0,2,0,16,0,136,0,1,0,0,0,2,0,32,32,32,32,232,232,127,127,224,224,12,12,64,64,0,0,32,32,0,0,8,8,8,8,0,0,29,29,192,192,1,1,0,0,0,0,0,0,0,0,34,0,33,0,0,0,0,0,0,0,0,0,146,146,20,20,38,38,34,34,7,7,68,68,254,254,63,63,42,42,63,63,0,0,0,0,130,130,1,1,136,136,36,36,126,126,32,32,0,0,0,0,8,8,8,8,32,32,68,68,0,0,0,0,34,34,33,33,8,8,0,0,32,32,68,68,0,0,0,0,0,0,0,0,68,0,34,0,40,0,18,0,0,0,0,0,224,224,0,0,85,85,32,32,38,38,34,34,0,0,0,0,132,132,32,32,191,191,68,68,0,0,0,0,60,60,10,10,232,232,127,127,132,132,32,32,8,8,0,0,16,16,32,32,16,16,16,16,16,16,8,8,16,16,2,2,0,0,0,0,38,38,2,2,146,146,68,68,42,42,63,63,63,63,65,65,34,34,72,72,0,0,0,0,4,4,16,16,146,146,72,72,132,132,16,16,144,144,18,18,35,35,35,35,34,34,127,127,0,0,0,0,196,196,63,63,0,0,0,0,128,128,0,0,222,222,127,127,128,128,0,0,0,0,0,0,0,0,0,0,0,0,1,1,132,132,32,32,198,198,36,36,4,4,0,0,0,0,16,16,136,136,1,1,2,2,16,16,0,0,0,0,32,32,4,4,32,32,8,8,0,0,1,1,128,128,0,0,0,0,2,2,16,16,68,68,8,8,65,65,4,4,32,32,32,32,0,0,32,32,0,0,8,8,16,16,0,0,58,58,128,128,3,3,0,0,0,0,60,60,8,8,16,16,80,80,64,64,0,0,8,8,16,16,32,32,0,0,96,96,12,12,16,16,16,16,0,0,3,3,0,0,4,4,4,4,32,32,0,0,0,0},
+ {192,0,1,0,192,0,1,0,192,0,1,0,0,8,0,8,0,16,0,8,0,252,0,63,0,0,0,16,0,130,0,7,0,2,0,8,0,26,0,16,0,192,0,0,0,66,0,32,0,0,0,0,0,192,0,1,0,66,0,34,192,0,1,0,192,0,1,0,192,0,1,0,0,0,0,0,156,156,63,63,72,72,8,8,0,0,0,0,0,0,0,0,5,5,32,32,8,8,33,33,0,0,0,0,0,0,8,8,8,8,16,16,196,196,63,63,0,0,0,0,64,64,1,1,8,8,33,33,0,0,0,0,68,68,34,34,128,128,0,0,64,64,1,1,0,0,0,0,209,209,127,127,242,242,79,79,16,16,34,34,252,252,63,63,0,0,0,0,200,200,69,69,34,34,34,34,4,4,64,64,66,66,32,32,0,64,0,2,0,8,0,8,0,16,0,8,0,252,0,63,0,0,0,16,0,130,0,7,0,2,0,8,0,26,0,16,0,192,0,0,64,64,80,80,2,2,4,4,36,36,18,18,66,66,32,32,16,0,4,0,252,0,63,0,120,0,0,0,0,0,2,0,208,208,16,16,4,4,8,8,26,26,16,16,64,64,0,0,32,32,0,0,40,40,8,8,248,248,3,3,32,32,1,1,0,0,0,0,0,0,0,0,34,0,37,0,0,0,0,0,0,0,0,0,255,255,37,37,229,229,63,63,4,4,68,68,128,128,0,0,73,73,33,33,0,0,0,0,64,64,2,2,136,136,36,36,66,66,34,34,0,0,0,0,40,40,8,8,255,255,127,127,0,0,0,0,34,34,41,41,0,0,0,0,255,255,127,127,0,0,0,0,0,0,0,0,68,0,34,0,36,0,18,0,0,0,0,0,94,94,0,0,85,85,62,62,229,229,63,63,0,0,0,0,4,4,32,32,136,136,40,40,0,0,0,0,36,36,75,75,4,4,8,8,132,132,32,32,0,0,0,0,16,16,16,16,0,0,16,16,104,104,4,4,16,16,66,66,0,0,0,0,64,64,1,1,146,146,68,68,73,73,33,33,1,1,65,65,34,34,72,72,0,0,0,0,252,252,31,31,254,254,72,72,252,252,31,31,8,8,18,18,48,48,48,48,34,34,17,17,0,0,0,0,68,68,4,4,255,255,127,127,188,188,30,30,0,0,4,4,128,128,64,64,0,0,0,0,0,0,0,0,0,0,0,0,66,66,32,32,117,117,36,36,2,2,0,0,0,0,16,16,120,120,0,0,252,252,63,63,0,0,0,0,224,224,7,7,32,32,8,8,128,128,2,2,132,132,32,32,0,0,0,0,16,16,68,68,8,8,65,65,4,4,32,32,32,32,120,120,32,32,120,120,4,4,16,16,240,240,7,7,64,64,2,2,0,0,0,0,32,32,8,8,16,16,144,144,64,64,0,0,16,16,16,16,32,32,14,14,16,16,144,144,80,80,16,16,0,0,13,13,0,0,8,8,4,4,32,32,0,0,0,0},
+ {160,0,2,0,160,0,2,0,160,0,2,0,0,4,0,8,0,16,0,8,0,0,0,0,0,0,0,8,0,2,0,4,0,2,0,8,0,4,0,16,0,32,0,0,0,66,0,32,0,0,0,0,0,56,0,14,0,66,0,34,160,0,2,0,160,0,2,0,160,0,2,0,0,0,0,0,170,170,36,36,72,72,8,8,0,0,0,0,0,0,0,0,228,228,63,63,8,8,33,33,0,0,0,0,248,248,15,15,0,0,8,8,68,68,32,32,0,0,0,0,64,64,2,2,28,28,33,33,0,0,0,0,68,68,34,34,96,96,0,0,128,128,0,0,0,0,0,0,31,31,4,4,18,18,72,72,8,8,34,34,132,132,16,16,0,0,0,0,164,164,70,70,34,34,33,33,0,0,0,0,66,66,32,32,0,48,0,4,0,4,0,8,0,16,0,8,0,0,0,0,0,0,0,8,0,2,0,4,0,2,0,8,0,4,0,16,0,32,0,0,64,64,16,16,2,2,4,4,4,4,2,2,66,66,32,32,16,0,4,0,0,0,0,0,8,0,0,0,0,0,1,0,16,16,13,13,4,4,8,8,4,4,16,16,64,64,0,0,160,160,15,15,40,40,8,8,0,0,1,1,16,16,2,2,0,0,0,0,0,0,0,0,62,0,37,0,254,0,63,0,0,0,0,0,146,146,68,68,36,36,34,34,4,4,68,68,128,128,0,0,0,0,33,33,0,0,0,0,48,48,4,4,156,156,63,63,66,66,34,34,254,254,63,63,40,40,8,8,16,16,8,8,0,0,0,0,18,18,47,47,0,0,32,32,16,16,8,8,0,0,0,0,0,0,0,0,124,0,18,0,4,0,2,0,0,0,0,0,64,64,32,32,85,85,34,34,36,36,34,34,0,0,0,0,2,2,32,32,136,136,40,40,0,0,0,0,164,164,42,42,4,4,8,8,132,132,32,32,0,0,32,32,16,16,16,16,0,0,8,8,132,132,4,4,16,16,66,66,0,0,0,0,128,128,0,0,210,210,68,68,0,0,33,33,1,1,65,65,250,250,73,73,0,0,0,0,4,4,16,16,146,146,72,72,132,132,16,16,124,124,18,18,64,64,0,0,34,34,17,17,0,0,0,0,212,212,127,127,129,129,64,64,0,0,0,0,0,0,4,4,255,255,127,127,0,0,0,0,0,0,0,0,0,0,0,0,66,66,32,32,68,68,36,36,2,2,0,0,0,0,16,16,8,8,0,0,0,0,0,0,0,0,0,0,32,32,4,4,32,32,8,8,128,128,2,2,248,248,39,39,0,0,0,0,56,56,68,68,8,8,65,65,4,4,64,64,32,32,7,7,32,32,7,7,4,4,16,16,0,0,2,2,32,32,4,4,0,0,0,0,32,32,9,9,8,8,16,16,64,64,31,31,16,16,8,8,144,144,49,49,254,254,255,255,80,80,16,16,0,0,17,17,0,0,23,23,4,4,64,64,0,0,0,0},
+ {148,0,20,0,148,0,20,0,148,0,20,0,0,0,0,4,0,16,0,8,0,0,0,0,0,0,0,4,0,2,0,4,0,2,0,8,0,0,0,16,0,16,0,0,0,66,0,32,0,0,0,0,0,135,0,48,0,34,0,36,148,0,20,0,148,0,20,0,148,0,20,0,0,0,0,0,138,138,36,36,68,68,8,8,0,0,0,0,0,0,0,0,4,4,2,2,8,8,33,33,0,0,0,0,0,0,0,0,0,0,8,8,196,196,63,63,0,0,0,0,32,32,2,2,42,42,33,33,0,0,0,0,244,244,127,127,16,16,24,24,224,224,127,127,0,0,0,0,68,68,68,68,242,242,79,79,124,124,66,66,132,132,16,16,0,0,0,0,164,164,124,124,250,250,47,47,0,0,16,16,66,66,32,32,0,8,0,24,0,0,0,4,0,16,0,8,0,0,0,0,0,0,0,4,0,2,0,4,0,2,0,8,0,0,0,16,0,16,0,0,32,32,0,0,2,2,4,4,4,4,5,5,66,66,32,32,16,0,4,0,0,0,0,0,8,0,0,0,0,0,3,0,8,8,3,3,6,6,8,8,0,0,16,16,32,32,0,0,112,112,16,16,16,16,8,8,0,0,1,1,16,16,2,2,0,0,0,0,0,0,0,0,34,0,37,0,34,0,34,0,0,0,0,0,146,146,68,68,36,36,34,34,68,68,66,66,128,128,64,64,8,8,63,63,0,0,0,0,8,8,24,24,170,170,36,36,126,126,34,34,34,34,34,34,16,16,8,8,8,8,16,16,0,0,0,0,10,10,32,32,63,63,127,127,8,8,16,16,0,0,0,0,0,0,0,0,68,0,20,0,4,0,5,0,0,0,0,0,64,64,60,60,117,117,2,2,36,36,34,34,0,0,0,0,254,254,33,33,186,186,24,24,0,0,0,0,36,36,18,18,6,6,8,8,252,252,63,63,63,63,127,127,16,16,8,8,0,0,4,4,0,0,3,3,8,8,34,34,0,0,0,0,224,224,127,127,18,18,68,68,8,8,63,63,1,1,65,65,42,42,73,73,0,0,0,0,4,4,16,16,146,146,68,68,132,132,16,16,34,34,20,20,252,252,31,31,62,62,17,17,0,0,0,0,12,12,0,0,129,129,64,64,252,252,31,31,30,30,36,36,0,0,8,8,0,0,0,0,0,0,0,0,0,0,0,0,66,66,32,32,68,68,36,36,2,2,0,0,0,0,16,16,8,8,0,0,0,0,0,0,0,0,0,0,32,32,4,4,240,240,31,31,64,64,4,4,64,64,64,64,0,0,0,0,84,84,68,68,248,248,127,127,4,4,64,64,16,16,0,0,16,16,0,0,4,4,16,16,0,0,2,2,32,32,4,4,0,0,0,0,32,32,6,6,8,8,16,16,224,224,32,32,32,32,8,8,80,80,64,64,0,0,32,32,32,32,16,16,0,0,33,33,224,224,24,24,4,4,64,64,0,0,0,0},
+ {142,0,56,0,142,0,56,0,142,0,56,0,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,2,0,10,0,4,0,10,0,8,0,0,0,16,0,8,0,0,0,34,0,32,0,0,0,0,0,128,0,0,0,34,0,36,142,0,56,0,142,0,56,0,142,0,56,0,0,0,0,0,137,137,63,63,68,68,72,72,0,0,0,0,0,0,0,0,4,4,66,66,4,4,33,33,0,0,0,0,0,0,0,0,0,0,4,4,84,84,32,32,0,0,0,0,32,32,4,4,74,74,33,33,0,0,0,0,34,34,17,17,44,44,7,7,48,48,64,64,0,0,0,0,149,149,44,44,194,194,66,66,70,70,66,66,132,132,16,16,0,0,0,0,146,146,68,68,130,130,32,32,252,252,63,63,34,34,32,32,0,252,0,111,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,2,0,10,0,4,0,10,0,8,0,0,0,16,0,8,0,0,32,32,0,0,2,2,4,4,3,3,5,5,34,34,32,32,0,0,4,0,0,0,0,0,8,0,0,0,128,0,4,0,132,132,1,1,5,5,8,8,0,0,16,16,32,32,0,0,44,44,32,32,16,16,8,8,0,0,1,1,32,32,3,3,14,14,0,0,0,0,0,0,34,0,21,0,34,0,34,0,0,0,0,0,255,255,69,69,228,228,63,63,68,68,66,66,255,255,127,127,72,72,33,33,0,0,0,0,252,252,111,111,138,138,36,36,66,66,34,34,34,34,34,34,16,16,8,8,244,244,39,39,0,0,0,0,242,242,39,39,33,33,33,33,244,244,39,39,14,14,0,0,0,0,0,0,68,0,20,0,3,0,5,0,0,0,0,0,240,240,3,3,67,67,2,2,228,228,63,63,0,0,0,0,2,2,33,33,138,138,18,18,0,0,0,0,36,36,18,18,5,5,8,8,132,132,32,32,33,33,33,33,16,16,4,4,0,0,2,2,0,0,2,2,8,8,34,34,0,0,0,0,48,48,64,64,56,56,68,68,72,72,33,33,1,1,65,65,42,42,73,73,0,0,0,0,4,4,16,16,254,254,68,68,252,252,31,31,17,17,12,12,4,4,16,16,130,130,16,16,0,0,0,0,231,231,15,15,252,252,31,31,132,132,16,16,128,128,127,127,0,0,40,40,14,14,0,0,0,0,0,0,0,0,0,0,34,34,32,32,68,68,36,36,2,2,0,0,0,0,16,16,8,8,0,0,0,0,0,0,0,0,0,0,32,32,0,0,16,16,16,16,32,32,8,8,64,64,64,64,0,0,0,0,148,148,68,68,8,8,65,65,68,68,80,80,16,16,0,0,16,16,0,0,20,20,16,16,0,0,2,2,64,64,6,6,28,28,0,0,32,32,0,0,8,8,16,16,88,88,64,64,32,32,8,8,48,48,64,64,0,0,32,32,32,32,16,16,0,0,65,65,16,16,0,0,68,68,80,80,28,28,0,0},
+ {204,0,25,0,204,0,25,0,204,0,25,0,0,0,0,2,0,0,0,4,0,0,0,0,0,128,0,1,0,202,0,15,0,10,0,8,0,0,0,16,0,4,0,0,0,34,0,16,0,4,0,0,0,255,0,127,0,18,0,36,204,0,25,0,204,0,25,0,204,0,25,0,0,0,0,0,136,136,36,36,244,244,127,127,0,0,0,0,0,0,64,64,244,244,127,127,4,4,33,33,0,0,0,0,0,0,0,0,0,0,2,2,204,204,63,63,0,0,0,0,16,16,4,4,9,9,33,33,0,0,0,0,34,34,17,17,227,227,0,0,44,44,64,64,0,0,0,0,21,21,22,22,162,162,74,74,69,69,66,66,132,132,16,16,0,0,0,0,138,138,68,68,130,130,32,32,4,4,16,16,34,34,16,16,0,11,0,8,0,0,0,2,0,0,0,4,0,0,0,0,0,128,0,1,0,202,0,15,0,10,0,8,0,0,0,16,0,4,0,0,32,32,0,0,202,202,15,15,130,130,8,8,34,34,16,16,0,0,2,0,0,0,0,0,8,0,0,0,64,0,8,0,64,64,1,1,4,4,8,8,0,0,16,16,32,32,0,0,34,34,32,32,0,0,4,4,248,248,3,3,192,192,2,2,17,17,0,0,0,0,0,0,162,0,20,0,32,0,2,0,0,0,0,0,16,16,68,68,4,4,1,1,120,120,66,66,128,128,0,0,127,127,33,33,0,0,0,0,11,11,8,8,137,137,63,63,66,66,34,34,32,32,2,2,0,0,4,4,66,66,68,68,0,0,0,0,18,18,36,36,33,33,33,33,66,66,68,68,17,17,0,0,0,0,0,0,100,0,8,0,130,0,8,0,0,0,0,0,79,79,0,0,65,65,2,2,4,4,1,1,0,0,0,0,0,0,33,33,138,138,89,89,0,0,0,0,36,36,34,34,4,4,8,8,132,132,32,32,33,33,33,33,16,16,2,2,128,128,1,1,0,0,5,5,4,4,18,18,0,0,0,0,44,44,64,64,84,84,68,68,127,127,33,33,63,63,65,65,42,42,73,73,0,0,0,0,252,252,31,31,16,16,68,68,128,128,64,64,240,240,8,8,4,4,16,16,130,130,16,16,0,0,0,0,132,132,8,8,132,132,16,16,252,252,31,31,128,128,32,32,254,254,63,63,17,17,0,0,0,0,0,0,4,4,0,0,34,34,16,16,68,68,60,60,74,74,0,0,0,0,16,16,8,8,0,0,0,0,0,0,0,0,0,0,32,32,0,0,8,8,32,32,32,32,8,8,64,64,64,64,8,8,0,0,18,18,68,68,8,8,65,65,68,68,96,96,16,16,0,0,16,16,0,0,20,20,16,16,240,240,7,7,128,128,5,5,34,34,0,0,32,32,0,0,8,8,16,16,68,68,64,64,32,32,4,4,0,0,64,64,248,248,35,35,0,0,8,8,0,0,1,1,8,8,0,0,68,68,96,96,34,34,0,0},
+ {192,0,1,0,192,0,1,0,192,0,1,0,0,0,0,1,0,0,0,2,0,0,0,0,0,98,0,0,0,36,0,52,0,10,0,8,0,0,0,12,0,4,0,0,0,20,0,16,0,4,0,0,0,160,0,2,0,10,0,32,192,0,1,0,192,0,1,0,192,0,1,0,0,0,0,0,136,136,36,36,2,2,0,0,1,1,0,0,255,255,127,127,4,4,5,5,4,4,33,33,1,1,0,0,0,0,0,0,0,0,1,1,131,131,8,8,1,1,0,0,16,16,8,8,9,9,33,33,1,1,0,0,34,34,81,81,32,32,32,32,35,35,64,64,1,1,0,0,149,149,21,21,146,146,68,68,124,124,66,66,132,132,16,16,1,1,0,0,130,130,68,68,250,250,47,47,4,4,16,16,20,20,16,16,0,8,0,8,0,0,0,1,0,0,0,2,0,0,0,0,0,98,0,0,0,36,0,52,0,10,0,8,0,0,0,12,0,4,0,0,64,64,0,0,42,42,52,52,130,130,8,8,20,20,16,16,0,0,2,0,0,0,0,0,8,0,0,0,32,0,16,0,32,32,1,1,4,4,8,8,0,0,12,12,64,64,0,0,34,34,32,32,0,0,4,4,4,4,13,13,0,0,2,2,17,17,0,0,0,0,0,0,190,0,8,0,32,0,66,0,0,0,0,0,16,16,60,60,68,68,1,1,0,0,65,65,128,128,0,0,8,8,63,63,1,1,0,0,8,8,8,8,9,9,4,4,126,126,34,34,32,32,66,66,0,0,4,4,33,33,4,4,1,1,0,0,18,18,36,36,33,33,33,33,33,33,4,4,17,17,0,0,0,0,0,0,92,0,20,0,130,0,8,0,0,0,0,0,64,64,64,64,127,127,66,66,68,68,1,1,1,1,0,0,0,0,33,33,206,206,36,36,1,1,0,0,34,34,34,34,4,4,8,8,132,132,32,32,33,33,33,33,144,144,1,1,98,98,0,0,128,128,0,0,4,4,10,10,1,1,0,0,35,35,64,64,148,148,64,64,8,8,63,63,1,1,57,57,41,41,65,65,1,1,0,0,4,4,16,16,254,254,68,68,255,255,127,127,31,31,20,20,252,252,31,31,130,130,16,16,1,1,0,0,132,132,124,124,132,132,16,16,132,132,16,16,158,158,32,32,16,16,8,8,17,17,0,0,0,0,0,0,4,4,0,0,20,20,16,16,68,68,4,4,138,138,0,0,0,0,16,16,8,8,0,0,0,0,0,0,1,1,0,0,32,32,0,0,8,8,32,32,16,16,16,16,64,64,64,64,8,8,0,0,18,18,64,64,8,8,65,65,40,40,64,64,136,136,0,0,136,136,0,0,20,20,16,16,8,8,26,26,0,0,4,4,34,34,0,0,32,32,0,0,8,8,8,8,68,68,64,64,0,0,4,4,0,0,64,64,8,8,34,34,0,0,8,8,0,0,1,1,8,8,0,0,40,40,64,64,34,34,0,0},
+ {128,0,0,0,128,0,0,0,128,0,0,0,0,192,0,0,0,128,0,1,0,0,0,0,0,30,0,0,0,68,0,68,0,4,0,4,0,240,0,3,0,12,0,0,0,8,0,12,0,24,0,0,0,144,0,4,0,2,0,32,128,0,0,0,128,0,0,0,128,0,0,0,0,0,0,0,136,136,63,63,130,130,16,16,6,6,0,0,0,0,0,0,132,132,8,8,2,2,33,33,6,6,0,0,0,0,64,64,192,192,0,0,128,128,72,72,6,6,0,0,8,8,16,16,8,8,63,63,6,6,0,0,241,241,127,127,32,32,32,32,32,32,64,64,6,6,0,0,101,101,36,36,138,138,72,72,68,68,58,58,132,132,28,28,6,6,0,0,129,129,68,68,130,130,32,32,4,4,16,16,8,8,12,12,0,8,0,8,0,192,0,0,0,128,0,1,0,0,0,0,0,30,0,0,0,68,0,68,0,4,0,4,0,240,0,3,0,12,0,0,64,64,0,0,68,68,68,68,66,66,16,16,8,8,12,12,0,0,1,0,0,0,0,0,240,0,63,0,24,0,32,0,16,16,0,0,4,4,8,8,240,240,3,3,64,64,0,0,36,36,17,17,0,0,2,2,8,8,49,49,0,0,1,1,17,17,0,0,0,0,0,0,80,0,20,0,16,0,66,0,0,0,0,0,240,240,4,4,132,132,2,2,0,0,33,33,128,128,0,0,20,20,18,18,6,6,0,0,8,8,8,8,136,136,63,63,66,66,34,34,16,16,66,66,0,0,2,2,32,32,4,4,6,6,0,0,242,242,39,39,33,33,33,33,32,32,4,4,17,17,0,0,0,0,0,0,67,0,20,0,66,0,16,0,0,0,0,0,64,64,64,64,65,65,66,66,132,132,2,2,6,6,0,0,0,0,33,33,26,26,66,66,6,6,0,0,34,34,66,66,4,4,8,8,130,130,32,32,33,33,33,33,120,120,0,0,30,30,0,0,96,96,0,0,2,2,7,7,6,6,0,0,32,32,64,64,18,18,64,64,20,20,18,18,1,1,1,1,169,169,65,65,6,6,0,0,4,4,16,16,16,16,66,66,128,128,0,0,16,16,18,18,4,4,16,16,66,66,16,16,6,6,0,0,68,68,64,64,132,132,16,16,252,252,95,95,146,146,32,32,32,32,8,8,17,17,0,0,0,0,0,0,24,24,0,0,8,8,12,12,68,68,68,68,4,4,63,63,252,252,63,63,240,240,63,63,0,0,0,0,6,6,0,0,248,248,1,1,62,62,248,248,124,124,124,124,128,128,32,32,48,48,0,0,16,16,64,64,4,4,65,65,40,40,0,0,8,8,1,1,8,8,1,1,8,8,8,8,16,16,98,98,0,0,2,2,34,34,0,0,192,192,63,63,16,16,12,12,72,72,34,34,0,0,130,130,0,0,48,48,8,8,34,34,0,0,4,4,0,0,1,1,48,48,0,0,40,40,0,0,34,34,0,0},
+ {0,0,0,0,0,0,0,0,0,0,0,0,0,48,0,0,0,112,0,0,0,0,0,0,0,0,0,0,0,132,0,7,0,4,0,4,0,0,0,0,0,240,0,31,0,0,0,3,0,224,0,63,0,140,0,24,0,2,0,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,17,17,98,98,32,32,8,8,0,0,0,0,0,0,68,68,16,16,2,2,32,32,8,8,0,0,255,255,127,127,56,56,0,0,64,64,72,72,8,8,0,0,4,4,32,32,8,8,33,33,8,8,0,0,17,17,16,16,32,32,32,32,224,224,127,127,8,8,0,0,4,4,68,68,2,2,64,64,68,68,2,2,128,128,0,0,8,8,0,0,129,129,124,124,130,130,32,32,4,4,16,16,0,0,3,3,0,248,0,15,0,48,0,0,0,112,0,0,0,0,0,0,0,0,0,0,0,132,0,7,0,4,0,4,0,0,0,0,0,240,0,31,128,128,1,1,132,132,7,7,48,48,32,32,0,0,3,3,192,0,0,0,0,0,0,0,0,0,0,0,6,0,64,0,16,16,0,0,4,4,8,8,0,0,0,0,128,128,1,1,24,24,14,14,128,128,1,1,240,240,1,1,128,128,1,1,14,14,0,0,0,0,0,0,34,0,34,0,8,0,66,0,0,0,0,0,15,15,4,4,68,68,12,12,128,128,32,32,128,128,0,0,34,34,33,33,8,8,0,0,248,248,15,15,8,8,4,4,66,66,32,32,8,8,66,66,128,128,1,1,16,16,4,4,8,8,0,0,18,18,32,32,63,63,63,63,16,16,4,4,14,14,0,0,0,0,0,0,64,0,34,0,48,0,32,0,0,0,0,0,64,64,64,64,65,65,66,66,68,68,12,12,8,8,0,0,128,128,32,32,97,97,0,0,8,8,0,0,34,34,2,2,4,4,8,8,130,130,32,32,63,63,63,63,16,16,0,0,0,0,0,0,28,28,0,0,1,1,2,2,8,8,0,0,224,224,127,127,17,17,64,64,34,34,33,33,0,0,1,1,33,33,64,64,8,8,0,0,4,4,16,16,112,112,66,66,128,128,0,0,16,16,33,33,4,4,16,16,65,65,16,16,8,8,0,0,68,68,64,64,132,132,28,28,132,132,64,64,146,146,32,32,32,32,8,8,14,14,0,0,0,0,0,0,224,224,63,63,0,0,3,3,68,68,64,64,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,31,192,192,127,127,16,16,64,64,4,4,65,65,16,16,0,0,4,4,254,254,4,4,254,254,8,8,8,8,224,224,3,3,0,0,3,3,28,28,0,0,0,0,0,0,224,224,3,3,48,48,28,28,254,254,255,255,224,224,15,15,248,248,35,35,0,0,3,3,0,0,1,1,192,192,31,31,16,16,0,0,28,28,0,0},
+ {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,131,0,96,0,2,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,232,232,96,96,25,25,64,64,8,8,0,0,0,0,0,0,52,52,96,96,1,1,32,32,8,8,0,0,0,0,0,0,0,0,0,0,48,48,120,120,8,8,0,0,3,3,64,64,8,8,0,0,8,8,0,0,1,1,14,14,192,192,63,63,32,32,64,64,8,8,0,0,4,4,7,7,254,254,127,127,124,124,2,2,128,128,0,0,8,8,0,0,129,129,68,68,130,130,60,60,252,252,31,31,0,0,0,0,0,8,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,14,14,0,0,0,0,12,12,64,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,224,31,31,4,4,15,15,0,0,0,0,0,0,14,14,0,0,0,0,96,96,0,0,0,0,0,0,112,112,0,0,0,0,0,0,0,0,0,0,161,0,65,0,7,0,124,0,0,0,0,0,0,0,4,4,52,52,112,112,64,64,28,28,240,240,0,0,193,193,64,64,8,8,0,0,8,8,8,8,200,200,127,127,114,114,56,56,7,7,124,124,96,96,0,0,140,140,3,3,8,8,0,0,2,2,60,60,33,33,33,33,140,140,3,3,0,0,0,0,0,0,0,0,64,0,65,0,12,0,64,0,0,0,0,0,128,128,127,127,127,127,124,124,52,52,112,112,8,8,0,0,120,120,32,32,129,129,127,127,8,8,0,0,25,25,2,2,4,4,15,15,129,129,60,60,33,33,33,33,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,0,0,32,32,64,64,16,16,120,120,193,193,64,64,0,0,1,1,32,32,112,112,8,8,0,0,252,252,31,31,15,15,57,57,128,128,0,0,220,220,64,64,252,252,31,31,33,33,16,16,8,8,0,0,55,55,56,56,128,128,0,0,128,128,127,127,158,158,63,63,0,0,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,132,132,127,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16,120,120,2,2,121,121,0,0,0,0,4,4,0,0,4,4,0,0,0,0,4,4,0,0,0,0,224,224,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,60,192,192,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0}};
+
+const unsigned char pattern4[16][4*11] = //まもなくいずみ中央
+{{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,37,37,0,0,0,0,128,128,0,0,128,128,0,0,0,0},
+ {0,128,0,1,0,96,0,0,0,48,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,73,73,128,128,0,0,128,128,0,0,128,128,0,0,0,0},
+ {0,0,0,1,0,64,0,0,0,64,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,73,73,244,244,1,1,128,128,32,32,128,128,16,16,0,0},
+ {0,2,0,63,0,66,0,0,0,32,0,1,0,0,0,2,0,0,0,0,0,0,1,1,0,0,225,225,127,127,136,136,0,0,254,254,127,127,252,252,63,63,0,0},
+ {0,252,0,1,0,252,0,3,0,226,0,16,0,0,0,1,0,0,0,0,0,0,2,2,4,4,30,30,1,1,128,128,0,0,130,130,32,32,132,132,16,16,0,0},
+ {0,0,0,1,0,64,0,0,0,60,0,32,0,192,0,0,0,0,0,0,0,0,2,2,8,8,0,0,1,1,64,64,12,12,130,130,32,32,132,132,16,16,0,0},
+ {0,0,0,29,0,64,0,0,0,16,0,64,0,32,0,0,0,0,0,0,0,0,2,2,16,16,192,192,1,1,64,64,8,8,130,130,32,32,132,132,16,16,0,0},
+ {0,248,0,3,0,66,0,16,0,16,0,108,0,16,0,0,0,0,0,0,0,0,2,2,16,16,32,32,1,1,248,248,8,8,130,130,32,32,132,132,16,16,0,0},
+ {0,0,0,1,0,252,0,19,0,16,0,68,0,8,0,0,0,0,0,0,0,0,2,2,32,32,16,16,2,2,38,38,11,11,130,130,32,32,132,132,80,80,0,0},
+ {0,0,0,1,0,32,0,32,0,8,0,4,0,16,0,0,0,0,0,0,0,0,2,2,32,32,16,16,2,2,33,33,12,12,254,254,63,63,255,255,127,127,0,0},
+ {0,0,0,1,0,32,0,32,0,8,0,4,0,32,0,0,0,0,0,0,0,0,34,34,40,40,32,32,3,3,17,17,20,20,130,130,32,32,64,64,1,1,0,0},
+ {0,248,0,3,0,32,0,32,0,4,0,4,0,64,0,0,0,0,0,0,0,0,34,34,48,48,192,192,2,2,9,9,36,36,130,130,0,0,32,32,2,2,0,0},
+ {0,4,0,13,0,32,0,32,0,196,0,15,0,128,0,1,0,0,0,0,0,0,20,20,32,32,0,0,2,2,6,6,66,66,128,128,0,0,32,32,2,2,0,0},
+ {0,8,0,49,0,64,0,16,0,34,0,52,0,0,0,2,0,0,0,0,0,0,20,20,0,0,0,0,1,1,128,128,1,1,128,128,0,0,16,16,4,4,0,0},
+ {0,240,0,1,0,128,0,15,0,64,0,68,0,0,0,4,0,0,0,0,0,0,8,8,0,0,128,128,1,1,96,96,0,0,128,128,0,0,12,12,24,24,0,0},
+ {0,0,0,0,0,0,0,0,0,128,0,7,0,0,0,8,0,0,0,0,0,0,0,0,0,0,112,112,0,0,0,0,0,0,128,128,0,0,3,3,96,96,0,0}};
+ 
+const unsigned char pattern5[16][4*11] = //まもなく緑園都市
+{{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,16,16,0,0,0,0,8,8,0,0,128,128,0,0,0,0,0,0},
+ {0,128,0,1,0,96,0,0,0,48,0,0,0,0,0,2,0,0,0,0,0,0,0,0,132,132,63,63,254,254,127,127,8,8,126,126,128,128,0,0,0,0,0,0},
+ {0,0,0,1,0,64,0,0,0,64,0,0,0,0,0,4,0,0,0,0,0,0,0,0,18,18,16,16,130,130,64,64,190,190,66,66,128,128,64,64,0,0,0,0},
+ {0,2,0,63,0,66,0,0,0,32,0,1,0,0,0,2,0,0,0,0,0,0,0,0,17,17,16,16,242,242,79,79,136,136,66,66,255,255,127,127,0,0,0,0},
+ {0,252,0,1,0,252,0,3,0,226,0,16,0,0,0,1,0,0,0,0,0,0,0,0,138,138,31,31,130,130,64,64,72,72,34,34,128,128,0,0,0,0,0,0},
+ {0,0,0,1,0,64,0,0,0,60,0,32,0,192,0,0,0,0,0,0,0,0,0,0,4,4,16,16,250,250,95,95,40,40,34,34,128,128,0,0,0,0,0,0},
+ {0,0,0,29,0,64,0,0,0,16,0,64,0,32,0,0,0,0,0,0,0,0,0,0,18,18,80,80,2,2,64,64,255,255,18,18,128,128,16,16,0,0,0,0},
+ {0,248,0,3,0,66,0,16,0,16,0,108,0,16,0,0,0,0,0,0,0,0,0,0,209,209,127,127,242,242,79,79,16,16,34,34,252,252,63,63,0,0,0,0},
+ {0,0,0,1,0,252,0,19,0,16,0,68,0,8,0,0,0,0,0,0,0,0,0,0,31,31,4,4,18,18,72,72,8,8,34,34,132,132,16,16,0,0,0,0},
+ {0,0,0,1,0,32,0,32,0,8,0,4,0,16,0,0,0,0,0,0,0,0,0,0,68,68,68,68,242,242,79,79,124,124,66,66,132,132,16,16,0,0,0,0},
+ {0,0,0,1,0,32,0,32,0,8,0,4,0,32,0,0,0,0,0,0,0,0,0,0,149,149,44,44,194,194,66,66,70,70,66,66,132,132,16,16,0,0,0,0},
+ {0,248,0,3,0,32,0,32,0,4,0,4,0,64,0,0,0,0,0,0,0,0,0,0,21,21,22,22,162,162,74,74,69,69,66,66,132,132,16,16,0,0,0,0},
+ {0,4,0,13,0,32,0,32,0,196,0,15,0,128,0,1,0,0,0,0,0,0,0,0,149,149,21,21,146,146,68,68,124,124,66,66,132,132,16,16,0,0,0,0},
+ {0,8,0,49,0,64,0,16,0,34,0,52,0,0,0,2,0,0,0,0,0,0,0,0,101,101,36,36,138,138,72,72,68,68,58,58,132,132,28,28,0,0,0,0},
+ {0,240,0,1,0,128,0,15,0,64,0,68,0,0,0,4,0,0,0,0,0,0,0,0,4,4,68,68,2,2,64,64,68,68,2,2,128,128,0,0,0,0,0,0},
+ {0,0,0,0,0,0,0,0,0,128,0,7,0,0,0,8,0,0,0,0,0,0,0,0,4,4,7,7,254,254,127,127,124,124,2,2,128,128,0,0,0,0,0,0}};
+
 char scan = 16; // 点灯中の行
-int round = 0; // スキャンを何周したか
-int scroll = 0; // 左スクロールした量
+//int round = 0; // スキャンを何周したか
+//int scroll = 0; // 左スクロールした量
+char speed = 30; // 5+11 // スクロール進段ミリ秒
 
 void receive() { // シリアル受信割り込み
 //    if(pc.getc() == 0b00000001) pc.printf("received!\r\n");
 //    pc.putc(pc.getc() + 1); // echo
 }
 
+//unsigned char getPattern(char const *p, char x, char y, bool s) {
+//    unsigned char r;
+//    r = (unsigned char)p[x][4*11-1-y%(4*11)];
+//    return r;
+//}
+
 int main() {
     SPI spi(D11, D12, D13); // SPIピン mosi, miso, sclk
     spi.format(8, MODE); // 74595へ~ビットずつ送る //立ち下りクロック
     spi.frequency(1*1000*1000); // 74595へのクロック周波数 最高96 初期1
 //    pc.attach(receive, Serial::RxIrq); // シリアル受信割り込み
 //    pc.baud(9600); // シリアル通信のクロックレート デフォルト9600
-//    timer.start(); // 経過時間のカウントを開始
+    timer.start(); // 経過時間のカウントを開始
+    timer.reset(); // 経過時間0秒
     
     while(1) {
-//        timer.reset(); // 経過時間0秒
-        
         // 行選択
         scan++; // 一行進む
         if(scan == 17+0) { // 16行目の次
             SER = LO; // 点灯
             scan = 1; // 1行目に戻る
-            round++; // スキャンが1周した
+//            round++; // スキャンが1周した
         } else if(scan == 2) { // 2行目
             SER = HI; // 消灯
         }
         
         // 表示パターン送り込み
+        int t = timer.read_ms();
+//        int t = scroll;
         for(int i=0; i<4*11; i++){ // iは最大で~*11文字
-//            if(round < 500) { 
-//                spi.write(pattern1[scan-1][8-1-i%8]);
-//            } else if(round < 1000) {
-                spi.write((unsigned char)~pattern2[scan-1][4*11-1-i%(4*11)]); //2*11-1-i%(2*11)
-//            } else {
-//                spi.write(pattern3[scan-1][8-1-i%8]);
-//            }
+            if(t/8/speed*2 < 4*(166+11)) {
+                unsigned char p;
+                char y = scan-1;
+                char x = 4*11-1-i%(4*11);
+                if(t/8/speed*2 <= i) {
+                    p  = (unsigned char)~0b00000000                     >> (  (t/speed)%8);
+                } else if(t/8/speed*2 <= 4*166+i) {
+                    p  = (unsigned char)~pattern3[y][x+(t/8/speed*2-4*11)]   >> (  (t/speed)%8);
+                } else {
+                    p  = (unsigned char)~0b00000000                     >> (  (t/speed)%8);
+                }
+                if(t/8/speed*2 <= i-4) {
+                    p += (unsigned char)~0b00000000                     << (8-(t/speed)%8);
+                } else if(t/8/speed*2 <= 4*166+i-4) {
+                    p += (unsigned char)~pattern3[y][x+(t/8/speed*2)+2-4*11] << (8-(t/speed)%8);
+                } else {
+                    p += (unsigned char)~0b00000000                     << (8-(t/speed)%8);
+                }
+                spi.write(p);
+            } else {
+                spi.write((unsigned char)~pattern4[scan-1][4*11-1-i%(4*11)]);
+//                spi.write((unsigned char)~0b00000000); //消灯
+            } 
+//            spi.write((unsigned char)~pattern2[scan-1][4*11-1-i%(4*11)]);
 //spi.write(0);
 //spi.write(0b11111111);
         }
         
         // スクロール
-        if(round > 1500) { // スクロール速度
-            scroll++; // 1ドットスクロールする
-            round = 0; // スキャン周回カウントリセット
-        }
-        if(scroll > 32) { // スクロール幅
-            scroll = 0; // スクロール数リセット
-        }
+//        if(round > speed) { // スクロール速度
+//            scroll++; // 1ドットスクロールする
+//            round = 0; // スキャン周回カウントリセット
+//        }
+//        if(scroll > 200) { // スクロール幅
+//            scroll = 0; // スクロール数リセット
+//        }
         
         RCK = LO;
         CLK = LO;