Advertisement
j0h

Turky.ino

j0h
Oct 29th, 2021
1,609
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 20.30 KB | None | 0 0
  1. // NeoPixel Ring simple sketch (c) 2013 Shae Erisson
  2. // released under the GPLv3 license to match the rest of the AdaFruit NeoPixel library
  3.  
  4. #include <Adafruit_NeoPixel.h>
  5. #include <unistd.h>   //used for some time functions
  6.  
  7. #ifdef __AVR__
  8.   #include <avr/power.h>
  9. #endif
  10. uint32_t prevTime;
  11. // Which pin on the Arduino is connected to the NeoPixels?
  12. // On a Trinket or Gemma we suggest changing this to 1
  13. #define PIN4           4             //data pin of pixel strip
  14. #define PIN3           6
  15.  
  16. // How many NeoPixels are attached to the Arduino?
  17. #define NUMPIXELS      32
  18.  
  19. Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN4, NEO_GRB + NEO_KHZ800);
  20. //const int buttonPin = 3;
  21.  
  22. int buttonState = 0;
  23.  
  24. int delayval   = 500; // delay for half a second
  25. int brightness =  2; //multiplier for intensity.
  26.  
  27. void setup() {
  28.   // This is for Trinket 5V 16MHz, you can remove these three lines if you are not using a Trinket
  29. #if defined (__AVR_ATtiny85__)
  30.   if (F_CPU == 16000000) clock_prescale_set(clock_div_1);
  31. #endif
  32. randomSeed(analogRead(1));
  33.   // End of trinket special code
  34.   pixels.begin(); // This initializes the NeoPixel library.
  35.    pinMode(4,OUTPUT ); //gnd
  36. pinMode(3, OUTPUT);    //+5 vcc
  37.   // End of trinket special code
  38.   digitalWrite(3, HIGH);
  39.   digitalWrite(4,LOW);
  40. // pinMode(buttonPin, INPUT);
  41. pinMode(PIN4, OUTPUT);
  42.  
  43.  
  44. }
  45. //These are colours I use frequently
  46. uint32_t c=0x000000;
  47. uint32_t y=0xFFFF00;
  48. uint32_t w=0xFFFFFF;
  49. uint32_t o=0xFFA500;
  50. uint32_t l=0x32CD32;
  51. uint32_t b=0x0000FF;
  52. uint32_t i=0x4B0082;
  53. uint32_t v=0x8A2BE2;
  54.  
  55. void somb(int){
  56.   int i=5;
  57.   //Blink on pin3 for ssombero string of LEDs
  58.   digitalWrite(PIN4, HIGH);   // turn the LED on (HIGH is the voltage level)
  59.   delay(i);               // wait for a second
  60.   digitalWrite(PIN4, LOW);    // turn the LED off by making the voltage LOW
  61.   delay(i);    
  62.   }
  63.  
  64.  
  65.  
  66.  
  67. void z(){
  68.   uint32_t p,r,o,y,g,b,i,v,l;
  69. p=0xFF69B4;  
  70. r=0xFF0000;
  71. o=0xFFA500;
  72. y=0xFFFF00;
  73. g=0x00FF00;
  74. l=0x32CD32;
  75. b=0x0000FF;
  76. i=0x4B0082;
  77. v=0x8A2BE2;
  78.     uint32_t a[9]= {p,r,y,o,g,b,i,v,l};
  79.   //pink lemonade
  80.     pixels.clear();
  81.   pixels.setBrightness(10);
  82. for(int j =0; j <6; j++){  
  83.   for(int i =0; i <32; i+=2){
  84.     pixels.setPixelColor(i,a[j]);
  85.     pixels.setPixelColor(i+1,a[j+2]);
  86.     }
  87.   pixels.show();
  88.   delay(5000);
  89.   }
  90. }
  91.  
  92. void cross(){
  93. pixels.clear();
  94. int i = rand() % 0 + 8;
  95. int b = rand() % 100 + 255;
  96. int n = i + 8;
  97. uint32_t p,r,o,y,g,x,z,v,l;
  98. pixels.setBrightness(b);
  99.  
  100. p=0xFF69B4;  
  101. r=0xFF0000;
  102. o=0xFFA500;
  103. y=0xFFFF00;
  104. g=0x00FF00;
  105. l=0x32CD32;
  106. z=0x0000FF;
  107. x=0x4B0082;
  108. v=0x8A2BE2;
  109.     uint32_t a[9]= {p,r,y,o,g,z,x,v,l};
  110. pixels.setPixelColor(i,a[i]);
  111. pixels.setPixelColor(n,a[i]);
  112. pixels.show();
  113. }
  114.  
  115.  
  116. void gay(){
  117. uint32_t r,o,y,g,b,i,v;
  118. r=0xFF0000;
  119. o=0xFF4400;
  120. y=0xFFFF00;
  121. g=0x00FF00;
  122. b=0x0000FF;
  123. i=0x6B0088;
  124. v=0x8A2BE2;  
  125.  
  126. pixels.clear();
  127. pixels.setBrightness(255);
  128. pixels.setPixelColor(0,i);
  129. pixels.setPixelColor(1, v);
  130. pixels.setPixelColor(2,v );
  131. pixels.setPixelColor(3,v );
  132. pixels.setPixelColor(4, i);
  133. pixels.setPixelColor(5, b);
  134. pixels.setPixelColor(6, g);
  135. pixels.setPixelColor(7, y);
  136. pixels.setPixelColor(8, o);
  137. pixels.setPixelColor(9, r);
  138. pixels.setPixelColor(10,r );
  139. pixels.setPixelColor(11,r );
  140. pixels.setPixelColor(12, o);
  141. pixels.setPixelColor(13, y);
  142. pixels.setPixelColor(14, g);
  143. pixels.setPixelColor(15, b);
  144. pixels.setPixelColor(16, i);
  145. pixels.setPixelColor(17, v);
  146. pixels.setPixelColor(18, v);
  147. pixels.setPixelColor(19, v);
  148. pixels.setPixelColor(20, i);
  149. pixels.setPixelColor(21, b);
  150. pixels.setPixelColor(22, g);
  151. pixels.setPixelColor(23, y);
  152. pixels.setPixelColor(24, o);
  153. pixels.setPixelColor(25, r);
  154. pixels.setPixelColor(26, r);
  155. pixels.setPixelColor(27, r);
  156. pixels.setPixelColor(28, o);
  157. pixels.setPixelColor(29, y);
  158. pixels.setPixelColor(30, g);
  159. pixels.setPixelColor(31, b);
  160.   pixels.show();
  161.   }
  162.  
  163.  
  164.  
  165. void perception(){
  166.   pixels.setBrightness(1);
  167.   pixels.clear();
  168.   int limit = 50;
  169.   uint32_t v=0xFF4400;
  170.   for(int k = 1; k < limit; k++ ){    
  171.      
  172.       for(int i =0; i < NUMPIXELS/2; i++){
  173.           pixels.setPixelColor(i, v);
  174.           pixels.setPixelColor(i+16, v);
  175.           pixels.show();
  176.           delay(k+(k+(i*5)));
  177.           pixels.clear();
  178.        }
  179.        pixels.clear();
  180.        delay(100);
  181.        
  182.      }
  183.   }
  184. void redstar(){
  185.   pixels.setBrightness(95);
  186.   pixels.clear();
  187.   int i = 1;
  188.   int x = 0;
  189.   while(x<NUMPIXELS){
  190.   for(i = 1; i < NUMPIXELS; i++){
  191.    // pixels.setPixelColor(0, pixels.Color(6.6*brightness,0*brightness,0*brightness)); //red
  192.     pixels.setPixelColor(i, pixels.Color(10*brightness,7*brightness,0*brightness)); //red
  193.     pixels.setPixelColor(i+(NUMPIXELS/2), pixels.Color(16*brightness,10*brightness,0*brightness)); //red
  194.     pixels.show();
  195.   delay(500);
  196.   pixels.clear();
  197.       }
  198.       x++;
  199.       }
  200. }
  201.  
  202. void colourTest(){
  203.     pixels.clear();
  204.   int i = 1;
  205.   int x = 0;
  206.   while(x<NUMPIXELS/2){
  207.   for(i = 1; i < NUMPIXELS; i++){
  208.    // pixels.setPixelColor(0, pixels.Color(6.6*brightness,0*brightness,0*brightness)); //red
  209.     pixels.setPixelColor(i, pixels.Color(0xFF,0xA5,0x00)); //red
  210.     pixels.setPixelColor(i+16, pixels.Color(0xFF,0xA5,0x00)); //red
  211.     pixels.show();
  212.   delay(200);
  213.   pixels.clear();
  214.       }
  215.       x++;
  216.       }
  217.   }
  218.  
  219. void flower(){
  220.   //yellow petals red core
  221.     pixels.setBrightness(95);
  222.     pixels.setPixelColor(0, pixels.Color(6.5*brightness,0*brightness,0*brightness)); // red n=0 is center.
  223.     for(int i = 1; i <= NUMPIXELS; i++){
  224.     pixels.setPixelColor(i, pixels.Color(3.6*brightness,3.6*brightness,0*brightness)); //yellow
  225.     pixels.show();
  226.     //maybe do a pulse and fade thing IDK
  227.   delay(500);
  228.     }
  229.     delay(10000);
  230.     }
  231.  
  232. void msltoe(){
  233.   //yellow petals red core
  234.     pixels.setBrightness(95);
  235.     pixels.setPixelColor(0, pixels.Color(6.5*brightness,0*brightness,0*brightness)); // red n=0 is center.
  236.     for(int i = 1; i <= NUMPIXELS; i++){
  237.     pixels.setPixelColor(i, pixels.Color(0*brightness,10*brightness,0*brightness)); //green
  238.    
  239.     pixels.show();
  240.     //maybe do a pulse and fade thing IDK
  241.   delay(500);
  242.     }
  243.     pixels.setPixelColor(1, pixels.Color(6.5*brightness,0*brightness,0*brightness));
  244.     pixels.setPixelColor(3, pixels.Color(6.5*brightness,0*brightness,0*brightness));
  245.     pixels.show();
  246.     delay(90000);
  247.     }
  248.  
  249. void annRand(){
  250.   pixels.setBrightness(95);
  251.   fill(0);
  252.   int Rn = random(0,9);
  253.   int Gn = random(0,9);
  254.   int Bn = random(0,9);
  255.   for(int j = NUMPIXELS/2; j>=0; j--){
  256.       pixels.setPixelColor(j, pixels.Color(Rn*brightness,Gn*brightness,Bn*brightness));
  257.       pixels.setPixelColor(j+16, pixels.Color(Rn*brightness,Gn*brightness,Bn*brightness));
  258.       pixels.show();
  259.       delay(333);
  260.       }
  261.       delay(9001);
  262.   }
  263.  
  264. void green(){
  265.   pixels.setBrightness(65);
  266.     for(int i=0;i<=NUMPIXELS;i++){
  267.     pixels.setPixelColor(i, pixels.Color(0*brightness,8.5*brightness,0*brightness)); // Moderately bright green color.
  268.     pixels.show(); // This sends the updated pixel color to the hardware.
  269.     delay(delayval); // Delay for a period of time (in milliseconds)
  270.   }}
  271.  
  272. void spinny(){
  273.   uint8_t offset = 0 ;
  274.   uint8_t  i;
  275.   uint32_t color  = 0xFFB500; // orange?
  276.       for(i=0; i<32; i++) {
  277.       uint32_t c = 0;
  278.       if(((offset + i) & 7) < 2) c = color; // 4 pixels on...
  279.       pixels.setPixelColor(   i, c); // First eye
  280.       pixels.setPixelColor(31-i, c); // Second eye (flipped)
  281.     }
  282.     pixels.show();
  283.     offset++;
  284.     delay(50);
  285.    
  286.   uint32_t t;
  287.   t = millis();
  288.   if((t - prevTime) > 8000) {      // Every 8 seconds...
  289.       color >>= 8;                 // Next color R->G->B
  290.       if(!color) color = 0xFF0000; // Reset to red
  291.     }
  292.     for(i=0; i<32; i++) pixels.setPixelColor(i, c);
  293.     //prevTime = t;
  294.     pixels.show();
  295.   }
  296.  
  297. void USA(){
  298.   pixels.setBrightness(155);
  299.   pixels.setPixelColor(0,  pixels.Color(8.5*brightness,0*brightness  ,0*brightness));  // red n=0 is center.
  300.   pixels.setPixelColor(1,  pixels.Color(8.5*brightness,0*brightness  ,0*brightness));
  301.   pixels.setPixelColor(2,  pixels.Color(8.5*brightness,0*brightness  ,0*brightness));
  302.   pixels.setPixelColor(4,  pixels.Color(8.5*brightness,0*brightness  ,0*brightness));
  303.   pixels.setPixelColor(6,  pixels.Color(8.5*brightness,0*brightness  ,0*brightness));
  304.   pixels.setPixelColor(8,  pixels.Color(8.5*brightness,0*brightness  ,0*brightness));
  305.   pixels.setPixelColor(9,  pixels.Color(8.5*brightness,0*brightness  ,0*brightness));
  306.   pixels.setPixelColor(10, pixels.Color(8.5*brightness,0*brightness  ,0*brightness));
  307.   pixels.setPixelColor(12, pixels.Color(8.5*brightness,0*brightness  ,0*brightness));
  308.   pixels.setPixelColor(14, pixels.Color(8.5*brightness,0*brightness  ,0*brightness));
  309.   pixels.setPixelColor(17, pixels.Color(8.5*brightness,0*brightness  ,0*brightness));
  310.   pixels.setPixelColor(18, pixels.Color(8.5*brightness,0*brightness  ,0*brightness));
  311.   pixels.setPixelColor(19, pixels.Color(8.5*brightness,0*brightness  ,0*brightness));
  312.   pixels.setPixelColor(21, pixels.Color(8.5*brightness,0*brightness  ,0*brightness));
  313.   pixels.setPixelColor(23, pixels.Color(8.5*brightness,0*brightness  ,0*brightness));
  314.   pixels.setPixelColor(25, pixels.Color(8.5*brightness,0*brightness  ,0*brightness));
  315.   pixels.setPixelColor(26, pixels.Color(8.5*brightness,0*brightness  ,0*brightness));
  316.   pixels.setPixelColor(31, pixels.Color(8.5*brightness,0*brightness  ,0*brightness));
  317.  
  318. //Blue
  319. pixels.setPixelColor(27, pixels.Color(0*brightness,0*brightness  ,8.5*brightness));
  320. pixels.setPixelColor(28, pixels.Color(0*brightness,0*brightness  ,8.5*brightness));
  321. pixels.setPixelColor(29, pixels.Color(0*brightness,0*brightness  ,8.5*brightness));
  322. pixels.setPixelColor(30, pixels.Color(0*brightness,0*brightness  ,8.5*brightness));
  323.  
  324. //white
  325. pixels.setPixelColor(3, pixels.Color(8.5*brightness,8.5*brightness   ,8.5*brightness));
  326. pixels.setPixelColor(5, pixels.Color(8.5*brightness,8.5*brightness   ,8.5*brightness));
  327. pixels.setPixelColor(7, pixels.Color(8.5*brightness,8.5*brightness   ,8.5*brightness));
  328. pixels.setPixelColor(11, pixels.Color(8.5*brightness,8.5*brightness  ,8.5*brightness));
  329. pixels.setPixelColor(13, pixels.Color(8.5*brightness,8.5*brightness  ,8.5*brightness));
  330. pixels.setPixelColor(15, pixels.Color(8.5*brightness,8.5*brightness  ,8.5*brightness));
  331. pixels.setPixelColor(16, pixels.Color(8.5*brightness,8.5*brightness  ,8.5*brightness));
  332. pixels.setPixelColor(20, pixels.Color(8.5*brightness,8.5*brightness  ,8.5*brightness));
  333. pixels.setPixelColor(22, pixels.Color(8.5*brightness,8.5*brightness  ,8.5*brightness));
  334. pixels.setPixelColor(24, pixels.Color(8.5*brightness,8.5*brightness  ,8.5*brightness));
  335. pixels.show();
  336.   delay(24000);
  337.  
  338.   }
  339.  
  340. void fill(int snap){//dual fill with snap
  341.   for(int j = NUMPIXELS/2; j>=0; j--){ //fall all double time
  342.       pixels.setPixelColor(j, w);
  343.       pixels.setPixelColor(j+16, w);
  344.      
  345.       pixels.show();
  346.       delay(snap); //snap?
  347.       }
  348.   }
  349. void chan4(){
  350.   uint32_t r,o,y,g,b,i,v;
  351. r=0xFF0000;
  352. o=0xFF4400;
  353. y=0xFFFF00;
  354. g=0x00FF00;
  355. b=0x0000FF;
  356. i=0x6B0088;
  357. v=0x8A2BE2;
  358.   uint32_t a[]={r,o,y,g,b,i,v};  //
  359.   //fill(44);
  360.       for(int n = 0; n<7; n++){
  361.  
  362.   pixels.setBrightness(96);
  363.   for(int j = 0; j<4; j+=1){
  364.     pixels.clear();
  365.  
  366.     for(int i=0; i<32; i+=4){
  367.     int cl = i+j;
  368.     uint32_t x = a[n];
  369.     pixels.setPixelColor(cl, a[n]);
  370.     pixels.setPixelColor(cl+1, a[n]);
  371.    
  372.     }
  373.   pixels.show();
  374.   delay(100);
  375.   }}
  376.  
  377.   //delay(200);
  378.   }
  379.  
  380. void flash(int x){
  381.   int rate = x;
  382.   if(rate!=600){
  383.     rate=rate;
  384.     }else{
  385.       rate=600;
  386.       }
  387.    
  388. pixels.setBrightness(255);
  389. fill(0);
  390. pixels.show();
  391.   delay(rate);
  392. pixels.setBrightness(0);
  393. fill(0);
  394. pixels.show();
  395.   delay(rate);
  396.   }
  397.  
  398. void fade(){              //fade out
  399.   int br = 195;           //lower brightness, makes this function shorter
  400.   int rate = 150;        
  401.   int decrement = 3;      //amount removed from brightness
  402. //pixels.setBrightness(br); //brightness is 255 (8bit)
  403. //fill(0);
  404.  
  405.   delay(rate);
  406. for(br; br>=0; br-=decrement){ //decrement 255 -n
  407. pixels.setBrightness(br);
  408. pixels.show();
  409. //fill(0); //quick fill but it fills blue
  410.   delay(rate);
  411.   }
  412. delay(3000); //stay off before next sequence
  413.   }
  414.  
  415. void intensify(){
  416.   int br = 0;           //lower brightness, makes this function shorter
  417.   int rate = 150;        
  418.   int decrement = 5;      //amount removed from brightness
  419. pixels.setBrightness(br); //brightness is 255 (8bit)
  420.  
  421.  
  422. pixels.show();
  423. //fill(0);
  424.   //delay(rate);
  425. for(br; br<=255; br = br + 5){ //decrement 255 -n
  426. pixels.setBrightness(br);
  427. pixels.setPixelColor(4,y);
  428. pixels.show();
  429. //fill(0); //quick fill but it fills blue
  430.   delay(rate);
  431.   }
  432. //delay(3000);
  433.  
  434.  
  435.   }
  436.  
  437.  
  438. void Randy(){
  439.   pixels.setBrightness(155);
  440.   //32bit rando, rand()only does 16 bit rand.
  441. uint32_t x  = rand() & rand();
  442.          x |= (rand() & rand()) << 8;
  443.          x |= (rand() & rand()) << 16;
  444.          x |= (rand() & rand()) << 24;
  445.          //x |= (rand() & 0xff) << 24;
  446.  //  x;  colour 32b
  447.  for (int i = 0; i < 32; i++){
  448.   pixels.setPixelColor(i,x);
  449.   pixels.show();
  450.   delay(50);
  451.    }
  452.    // delay(5000);
  453.   }
  454.  
  455. void Randy2(){
  456.   uint32_t a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;
  457.  
  458. a=0x0eeadf;
  459. b=0x0000ff;
  460. c=0x560553;
  461. d=0x2600ff;
  462. e=0xadd664;
  463. f=0xf3d187;
  464. g=0x00ff00;
  465. h=0xca66c3;
  466. i=0x89015e;
  467. j=0x8c60fc;
  468. k=0x024def;
  469. l=0xe9359b;
  470. m=0xf05b16;
  471. n=0x17055e;
  472. o=0xff5900;
  473. p=0xfc14f0;
  474. q=0xc95725;
  475. r=0xff0000;
  476. s=0xCBD009;
  477. t=0x00ff55;
  478. u=0xDAC9CF;
  479. v=0xFDDFBD;
  480. w=0xD61501;
  481. x=0xFD0450;
  482. y=0xfaff00;
  483. z=0x000000;
  484.  
  485. uint32_t colourArray[]={a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z};
  486. int RandomNumber = random(0,25);
  487.  for (int i = 0; i < 32; i++){
  488.   pixels.setPixelColor(i,colourArray[RandomNumber]);
  489.   pixels.show();
  490.   delay(50);
  491.    }
  492.  
  493.   }
  494.  
  495.  
  496.  
  497. void halo(){
  498.   pixels.clear();
  499.   pixels.setBrightness(30);
  500.   uint32_t x = 0xffff00;
  501.   for (int i = 0; i<NUMPIXELS; i++){
  502.     pixels.setPixelColor(i,x);
  503.     pixels.show();
  504.     delay(240);
  505.     }
  506.     delay(14000);
  507.   }
  508.  
  509. void bod(){  
  510. int start = 16;
  511. int last  = 32;
  512.   for(int start=16; last<=32; start+=2){
  513.      pixels.setPixelColor(start,y);
  514.     }
  515.     pixels.show();
  516. }
  517.  
  518.  
  519.  
  520. void waka(){
  521.   delay(400);
  522.     pixels.setPixelColor(15,y);
  523.     pixels.setPixelColor(12,y);
  524.     pixels.show();
  525.   delay(200);
  526.     pixels.setPixelColor(14,y);
  527.     pixels.setPixelColor(13,y);
  528.     pixels.show();
  529.  
  530.      delay(200);
  531.     pixels.setPixelColor(14,c);
  532.     pixels.setPixelColor(13,c);
  533.     pixels.show();
  534.  
  535.     delay(400);
  536.     pixels.setPixelColor(15,c);
  537.     pixels.setPixelColor(12,c);
  538.     pixels.show();
  539.   }
  540.  
  541. void pacman(){
  542.  
  543. //yum pods
  544. pixels.setBrightness(255);
  545. for(int n = 0; n < 12; n++){
  546. pixels.setPixelColor(n,y);
  547. }
  548.  
  549. bod();
  550.  
  551. for(int e = 0; e < 5; e++){
  552. waka();
  553. }
  554.  
  555.  
  556.   }
  557.  
  558. void amaratsu(){
  559.   //The Sun gods go hard bitch.
  560. //but maybe sunrize and sunset would be cool
  561.       pixels.setBrightness(255);
  562.     for(int x=16; x<32; x++){
  563.        pixels.setPixelColor(x,y);
  564.        pixels.show();
  565.        }
  566.        delay(3000);
  567.        
  568.      //  flash(0);
  569.       pixels.setBrightness(255);
  570.     for(int x=16; x<32; x++){
  571.        pixels.setPixelColor(x,y);
  572.        pixels.show();
  573.        }
  574.        delay(1000);
  575.      
  576.        fade(); //ok moon.
  577.   }
  578. void tsukiyami(){ //moon time is a whole month
  579.    
  580. //    amaratsu();
  581.     pixels.clear();
  582.     pixels.show();
  583.    
  584.     delay(300);
  585.     pixels.setBrightness(255);
  586.  
  587.     pixels.setPixelColor(6,b);
  588.     pixels.setPixelColor(5,b);
  589.     pixels.setPixelColor(4,b);
  590.    
  591.     pixels.show();
  592.     delay(1000);
  593.     //pixels.clear();
  594.     fade();
  595.    
  596.     //pixels.show();
  597.     delay(1000); //its day time MF
  598.     amaratsu();
  599.  
  600.     pixels.setBrightness(255);
  601.     pixels.setPixelColor(7,b);
  602.     pixels.setPixelColor(6,b);
  603.     pixels.setPixelColor(5,b);
  604.     pixels.setPixelColor(4,b);
  605.     pixels.setPixelColor(3,b);
  606.  
  607.     pixels.show();
  608.     delay(1000);
  609.     fade();
  610.  
  611.     delay(1000); //its day time MF
  612.     amaratsu();
  613.  
  614.     pixels.setBrightness(255);
  615.     pixels.setPixelColor(8,b);
  616.     pixels.setPixelColor(7,b);
  617.     pixels.setPixelColor(6,b);
  618.     pixels.setPixelColor(5,b);
  619.     pixels.setPixelColor(4,b);
  620.     pixels.setPixelColor(3,b);
  621.     pixels.setPixelColor(2,b);
  622.  
  623.     pixels.show();
  624.     delay(1000);
  625.     fade();
  626.     delay(1000); //its day time MF
  627.     amaratsu();
  628.    
  629.     pixels.setBrightness(255);
  630.     pixels.setPixelColor(10,b);
  631.     pixels.setPixelColor(9,b);
  632.     pixels.setPixelColor(8,b);
  633.     pixels.setPixelColor(7,b);
  634.     pixels.setPixelColor(6,b);
  635.     pixels.setPixelColor(5,b);
  636.     pixels.setPixelColor(4,b);
  637.     pixels.setPixelColor(3,b);
  638.     pixels.setPixelColor(2,b);
  639.     pixels.setPixelColor(1,b);    
  640.     pixels.setPixelColor(0,b);
  641.    
  642.     pixels.show();
  643.     delay(1000);
  644.     fade();
  645.     delay(1000); //its day time MF
  646.     amaratsu();
  647.  
  648.     pixels.setBrightness(255);    
  649.     pixels.setPixelColor(12,b);
  650.     pixels.setPixelColor(11,b);
  651.     pixels.setPixelColor(10,b);
  652.     pixels.setPixelColor(9,b);
  653.     pixels.setPixelColor(8,b);
  654.     pixels.setPixelColor(7,b);
  655.     pixels.setPixelColor(6,b);
  656.     pixels.setPixelColor(5,b);
  657.     pixels.setPixelColor(4,b);
  658.     pixels.setPixelColor(3,b);
  659.     pixels.setPixelColor(2,b);
  660.     pixels.setPixelColor(1,b);    
  661.     pixels.setPixelColor(0,b);
  662.     pixels.setPixelColor(15,b);
  663.    
  664.     pixels.show();
  665.     delay(1000);
  666.     fade();  
  667.     delay(1000); //its day time MF
  668.     amaratsu();
  669. //Its a Full Moon        
  670.     pixels.setBrightness(255);
  671.     for(int x=0; x<16; x++){
  672.        pixels.setPixelColor(x,b);
  673.        pixels.show();
  674.       }
  675.  
  676.     delay(1000); //its day time MF
  677.     amaratsu();
  678.  
  679.     pixels.setBrightness(255);    
  680.     pixels.setPixelColor(13,b);
  681.     pixels.setPixelColor(12,b);
  682.     pixels.setPixelColor(11,b);
  683.     pixels.setPixelColor(10,b);
  684.     pixels.setPixelColor(9,b);
  685.     pixels.setPixelColor(8,b);
  686.     pixels.setPixelColor(7,b);
  687.     pixels.setPixelColor(4,b);
  688.     pixels.setPixelColor(3,b);
  689.     pixels.setPixelColor(2,b);
  690.     pixels.setPixelColor(1,b);    
  691.     pixels.setPixelColor(0,b);
  692.     pixels.setPixelColor(15,b);
  693.     pixels.setPixelColor(16,b);
  694.    
  695.     pixels.show();
  696.     delay(1000);
  697.     fade();
  698.  
  699.     delay(1000); //its day time MF
  700.     amaratsu();
  701.  
  702.     pixels.setBrightness(255);    
  703.     pixels.setPixelColor(13,b);
  704.     pixels.setPixelColor(12,b);
  705.     pixels.setPixelColor(11,b);
  706.     pixels.setPixelColor(10,b);
  707.     pixels.setPixelColor(9,b);
  708.     pixels.setPixelColor(8,b);
  709.     pixels.setPixelColor(3,b);
  710.     pixels.setPixelColor(2,b);
  711.     pixels.setPixelColor(1,b);    
  712.     pixels.setPixelColor(0,b);
  713.     pixels.setPixelColor(15,b);
  714.     pixels.setPixelColor(16,b);
  715.    
  716.     pixels.show();
  717.     delay(1000);
  718.     fade();
  719.  
  720.  
  721.     delay(1000); //its day time MF
  722.     amaratsu();
  723.  
  724.     pixels.setBrightness(255);    
  725.     pixels.setPixelColor(13,b);    
  726.     pixels.setPixelColor(12,b);
  727.     pixels.setPixelColor(11,b);
  728.     pixels.setPixelColor(10,b);
  729.     pixels.setPixelColor(9,b);
  730.     pixels.setPixelColor(2,b);
  731.     pixels.setPixelColor(1,b);    
  732.     pixels.setPixelColor(0,b);
  733.     pixels.setPixelColor(15,b);
  734.     pixels.setPixelColor(16,b);
  735.    
  736.     pixels.show();
  737.     delay(1000);
  738.     fade();
  739.  
  740.  
  741.     delay(1000); //its day time MF
  742.     amaratsu();
  743.  
  744.     pixels.setBrightness(255);
  745.     pixels.setPixelColor(13,b);        
  746.     pixels.setPixelColor(12,b);
  747.     pixels.setPixelColor(11,b);
  748.     pixels.setPixelColor(10,b);
  749.     pixels.setPixelColor(1,b);    
  750.     pixels.setPixelColor(0,b);
  751.     pixels.setPixelColor(15,b);
  752.     pixels.setPixelColor(16,b);
  753.    
  754.     pixels.show();
  755.     delay(1000);
  756.     fade();
  757.  
  758.     delay(1000); //its day time MF
  759.     amaratsu();
  760.  
  761.     pixels.setBrightness(255);
  762.     pixels.setPixelColor(13,b);      
  763.     pixels.setPixelColor(12,b);
  764.     pixels.setPixelColor(11,b);    
  765.     pixels.setPixelColor(0,b);
  766.     pixels.setPixelColor(15,b);
  767.     pixels.setPixelColor(16,b);
  768.    
  769.     pixels.show();
  770.     delay(1000);
  771.     fade();                    
  772.        
  773.     delay(1000); //its day time MF
  774.     amaratsu();
  775.  
  776.     pixels.setBrightness(255);
  777.     pixels.setPixelColor(13,b);        
  778.     pixels.setPixelColor(12,b);
  779.     pixels.setPixelColor(15,b);
  780.     pixels.setPixelColor(16,b);
  781.    
  782.     pixels.show();
  783.     delay(1000);
  784.     fade();
  785.  
  786.    
  787.   //delay(1000);
  788.   }
  789. void sunSet(){}
  790. void sunRise(){}    
  791.  
  792.  
  793.  
  794.  
  795. void loop() {
  796.  
  797. //chan4();
  798.  
  799. //cross();
  800.  z();
  801.   //pixels.show();
  802.   delay(1000);
  803.  
  804.   }
  805.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement